mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
Open the floppy disk device with O_RDONLY rather than O_RDWR. After
all, this is the fd*read* command, and thus should be able to read even write-protected disks. MFC after: 1 week
This commit is contained in:
parent
c9afaa6389
commit
beee0062b5
1 changed files with 1 additions and 1 deletions
|
|
@ -149,7 +149,7 @@ main(int argc, char **argv)
|
|||
err(EX_OSERR, "cannot create output file %s", fname);
|
||||
}
|
||||
|
||||
if ((fd = open(_devname, O_RDWR)) == -1)
|
||||
if ((fd = open(_devname, O_RDONLY)) == -1)
|
||||
err(EX_OSERR, "cannot open device %s", _devname);
|
||||
|
||||
return (numids? doreadid(fd, numids, trackno): doread(fd, of, _devname));
|
||||
|
|
|
|||
Loading…
Reference in a new issue