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
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=223197
@ -149,7 +149,7 @@ main(int argc, char **argv)
|
|||||||
err(EX_OSERR, "cannot create output file %s", fname);
|
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);
|
err(EX_OSERR, "cannot open device %s", _devname);
|
||||||
|
|
||||||
return (numids? doreadid(fd, numids, trackno): doread(fd, of, _devname));
|
return (numids? doreadid(fd, numids, trackno): doread(fd, of, _devname));
|
||||||
|
Loading…
Reference in New Issue
Block a user