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.
This commit is contained in:
peter 2005-10-26 22:28:38 +00:00
parent a3aa8bfa03
commit 5ac29c381d

View File

@ -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));