From 28ee5250ac542f0374f1ec07f32276a5581a2353 Mon Sep 17 00:00:00 2001 From: joerg Date: Wed, 24 Jun 2009 19:47:53 +0000 Subject: 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. --- usr.sbin/fdformat/fdformat.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'usr.sbin/fdformat') diff --git a/usr.sbin/fdformat/fdformat.c b/usr.sbin/fdformat/fdformat.c index 8e29e40..807ad8d 100644 --- a/usr.sbin/fdformat/fdformat.c +++ b/usr.sbin/fdformat/fdformat.c @@ -146,7 +146,7 @@ main(int argc, char **argv) struct fdc_status fdcs[MAXPRINTERRS]; int format, fill, quiet, verify, verify_only, confirm; int fd, c, i, track, error, tracks_per_dot, bytes_per_track, errs; - int fdopts, flags; + int flags; char *fmtstring, *device; const char *name, *descr; @@ -250,11 +250,6 @@ main(int argc, char **argv) errx(EX_OSERR, "not a floppy disk: %s", device); if (ioctl(fd, FD_GDTYPE, &type) == -1) err(EX_OSERR, "ioctl(FD_GDTYPE)"); - if (ioctl(fd, FD_GOPTS, &fdopts) == -1) - err(EX_OSERR, "ioctl(FD_GOPTS)"); - fdopts |= FDOPT_NOERRLOG; - if (ioctl(fd, FD_SOPTS, &fdopts) == -1) - err(EX_OSERR, "ioctl(FD_SOPTS, FDOPT_NOERRLOG)"); if (format) { getname(type, &name, &descr); fdtp = get_fmt(format, type); -- cgit v1.1