projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
date and time created 83/08/11 20:49:40 by sam
[unix-history]
/
usr
/
src
/
old
/
rxformat
/
rxformat.c
diff --git
a/usr/src/old/rxformat/rxformat.c
b/usr/src/old/rxformat/rxformat.c
index
f224513
..
43d0cb6
100644
(file)
--- a/
usr/src/old/rxformat/rxformat.c
+++ b/
usr/src/old/rxformat/rxformat.c
@@
-1,12
+1,16
@@
+/* rxformat.c 4.4 83/06/02 */
#include <stdio.h>
#include <sys/file.h>
#include <errno.h>
#include <stdio.h>
#include <sys/file.h>
#include <errno.h>
-#include "/sys/vaxuba/rxreg.h"
+#include <vaxuba/rxreg.h>
+
+char devname[] = "/dev/rrx?a";
/*
/*
- *
format floppy disks on RX02
+ *
Format RX02 floppy disks.
*/
*/
+
main(argc, argv)
int argc;
char *argv[];
main(argc, argv)
int argc;
char *argv[];
@@
-19,21
+23,26
@@
main(argc, argv)
if (strncmp(argv[1],"-d",2) != 0)
usage();
idens++;
if (strncmp(argv[1],"-d",2) != 0)
usage();
idens++;
- filarg
= 2
;
+ filarg
++
;
}
}
- if ((fd = open(argv[filarg], FRDWR, 0666)) < NULL) {
- perror(argv[filarg]);
+ devname[8] = argv[filarg][7];
+ if ((fd = open(devname, O_RDWR)) < NULL) {
+ perror(devname);
exit (0);
}
exit (0);
}
- printf("Format %s to",
*(argv[filarg])
);
+ printf("Format %s to",
argv[filarg]
);
if (idens)
printf(" double density (y/n) ?");
else
printf(" single density (y/n) ?");
if (getchar() != 'y')
exit (0);
if (idens)
printf(" double density (y/n) ?");
else
printf(" single density (y/n) ?");
if (getchar() != 'y')
exit (0);
+ /*
+ * Change the ioctl command when dkio.h has
+ * been finished.
+ */
if (ioctl(fd, RXIOC_FORMAT, &idens) != NULL)
if (ioctl(fd, RXIOC_FORMAT, &idens) != NULL)
- perror(
argv[2]
);
+ perror(
devname
);
close (fd);
}
close (fd);
}