diff options
author | joerg <joerg@FreeBSD.org> | 2009-06-24 19:47:53 +0000 |
---|---|---|
committer | joerg <joerg@FreeBSD.org> | 2009-06-24 19:47:53 +0000 |
commit | 28ee5250ac542f0374f1ec07f32276a5581a2353 (patch) | |
tree | 7c80e7b291959bae36b32f2ec52a06cf667479e5 /usr.sbin/fdread | |
parent | 8c4a62bd5baed926c5edabe6c2a36fe1d5cf7376 (diff) | |
download | FreeBSD-src-28ee5250ac542f0374f1ec07f32276a5581a2353.zip FreeBSD-src-28ee5250ac542f0374f1ec07f32276a5581a2353.tar.gz |
Drop the defunct FDOPT_NOERRLOG option from all the floppy utilities.
The kernel does not log floppy media errors anymore.
In fdcontrol, do always open the file descriptor in read-only mode so
it can operate on read-only media, as there is no longer a separate
control device to operate on.
Diffstat (limited to 'usr.sbin/fdread')
-rw-r--r-- | usr.sbin/fdread/fdread.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/usr.sbin/fdread/fdread.c b/usr.sbin/fdread/fdread.c index 2539b3a..1aae665 100644 --- a/usr.sbin/fdread/fdread.c +++ b/usr.sbin/fdread/fdread.c @@ -166,9 +166,6 @@ doread(int fd, FILE *of, const char *_devname) if (ioctl(fd, FD_GTYPE, &fdt) == -1) err(EX_OSERR, "ioctl(FD_GTYPE) failed -- not a floppy?"); - fdopts = FDOPT_NOERRLOG; - if (ioctl(fd, FD_SOPTS, &fdopts) == -1) - err(EX_OSERR, "ioctl(FD_SOPTS, FDOPT_NOERRLOG)"); secsize = 128 << fdt.secsize; tracksize = fdt.sectrac * secsize; @@ -300,7 +297,7 @@ doread(int fd, FILE *of, const char *_devname) int doreadid(int fd, unsigned int numids, unsigned int trackno) { - int rv = 0, fdopts; + int rv = 0; unsigned int i; struct fdc_readid info; struct fdc_status fdcs; @@ -309,10 +306,6 @@ doreadid(int fd, unsigned int numids, unsigned int trackno) if (ioctl(fd, FD_GTYPE, &fdt) == -1) err(EX_OSERR, "ioctl(FD_GTYPE) failed -- not a floppy?"); - fdopts = FDOPT_NOERRLOG; - if (ioctl(fd, FD_SOPTS, &fdopts) == -1) - err(EX_OSERR, "ioctl(FD_SOPTS, FDOPT_NOERRLOG)"); - for (i = 0; i < numids; i++) { info.cyl = trackno / fdt.heads; info.head = fdt.heads > 1? trackno % fdt.heads: 0; |