diff options
author | millert <millert@openbsd.org> | 1997-09-21 00:30:11 +0000 |
---|---|---|
committer | millert <millert@openbsd.org> | 1997-09-21 00:30:11 +0000 |
commit | 930d1a1b9878a437cfea0eee5b30f96c922e4fa9 (patch) | |
tree | 3c59a37f4a0ef5a65d0d02b768d98f591d841acf /usr.sbin/fdformat | |
parent | Fix some nits, including using fd0c, not fd0 as noted by toddf@openbsd.org. (diff) | |
download | wireguard-openbsd-930d1a1b9878a437cfea0eee5b30f96c922e4fa9.tar.xz wireguard-openbsd-930d1a1b9878a437cfea0eee5b30f96c922e4fa9.zip |
Make "fdformat fd0" work.
Diffstat (limited to 'usr.sbin/fdformat')
-rw-r--r-- | usr.sbin/fdformat/fdformat.1 | 8 | ||||
-rw-r--r-- | usr.sbin/fdformat/fdformat.c | 6 |
2 files changed, 5 insertions, 9 deletions
diff --git a/usr.sbin/fdformat/fdformat.1 b/usr.sbin/fdformat/fdformat.1 index a37319c196a..798ab72edd5 100644 --- a/usr.sbin/fdformat/fdformat.1 +++ b/usr.sbin/fdformat/fdformat.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: fdformat.1,v 1.3 1997/09/21 00:10:43 millert Exp $ +.\" $OpenBSD: fdformat.1,v 1.4 1997/09/21 00:30:11 millert Exp $ .\" .\" Copyright (C) 1993, 1994 by Joerg Wunsch, Dresden .\" All rights reserved. @@ -55,11 +55,7 @@ should be a character device; it may be given either with a full path name of a raw device node for a floppy disk drive .Pq e.\ g. Pa /dev/rfd0c , or default name in an abbreviated form -.Pq e.\ g. Em fd0c . -In the latter case, the name is constructed by prepending -.Pa /dev/r -to the -.Ar device_name . +.Pq e.\ g. Em fd0 . Note that any geometry constraints of the device node .Pq minor device number are meaningless, since they're overridden by diff --git a/usr.sbin/fdformat/fdformat.c b/usr.sbin/fdformat/fdformat.c index 121773d9b18..947add827bb 100644 --- a/usr.sbin/fdformat/fdformat.c +++ b/usr.sbin/fdformat/fdformat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fdformat.c,v 1.4 1997/08/18 03:11:30 millert Exp $ */ +/* $OpenBSD: fdformat.c,v 1.5 1997/09/21 00:30:11 millert Exp $ */ /* * Copyright (C) 1992-1994 by Joerg Wunsch, Dresden @@ -47,6 +47,7 @@ #include <string.h> #include <ctype.h> #include <err.h> +#include <util.h> #include <errno.h> #include <sys/types.h> @@ -244,8 +245,7 @@ main(argc, argv) if(optind != argc - 1) usage(); - fd = opendev(argv[optind], O_RDWR, 0, &devname); - if (fd < 0) + if ((fd = opendev(argv[optind], O_RDWR, OPENDEV_PART, &devname)) < 0) err(1, devname); if(ioctl(fd, FD_GTYPE, &fdt) < 0) |