diff options
author | peter <peter@FreeBSD.org> | 2005-10-26 22:28:38 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2005-10-26 22:28:38 +0000 |
commit | 5ac29c381d7101af937dab4068b1571b5be524eb (patch) | |
tree | a1d02fcee0405e36d5a83dccb1fa9d206ee58d7f /usr.sbin | |
parent | a3aa8bfa03310dfc6b17bf722f208bbb043ba967 (diff) | |
download | FreeBSD-src-5ac29c381d7101af937dab4068b1571b5be524eb.zip FreeBSD-src-5ac29c381d7101af937dab4068b1571b5be524eb.tar.gz |
fdread cannot work without opening the /dev/fd node in O_RDWR mode now,
because it sets the floppy controller parameters, which requires O_RDWR.
Specifically, the FD_SOPTS ioctl requires this, and the code errors out
and aborts if it can't do it. Among other things, it is changing the
FDOPT_NOERRLOG flag. Broken in 6.0 as well.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/fdread/fdread.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/fdread/fdread.c b/usr.sbin/fdread/fdread.c index 8aee99b..8135170 100644 --- a/usr.sbin/fdread/fdread.c +++ b/usr.sbin/fdread/fdread.c @@ -149,7 +149,7 @@ main(int argc, char **argv) err(EX_OSERR, "cannot create output file %s", fname); } - if ((fd = open(_devname, O_RDONLY)) == -1) + if ((fd = open(_devname, O_RDWR)) == -1) err(EX_OSERR, "cannot open device %s", _devname); return (numids? doreadid(fd, numids, trackno): doread(fd, of, _devname)); |