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:
parent
cb496fcf97
commit
cb89fb11b7
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user