diff options
author | joerg <joerg@FreeBSD.org> | 2001-06-26 22:19:32 +0000 |
---|---|---|
committer | joerg <joerg@FreeBSD.org> | 2001-06-26 22:19:32 +0000 |
commit | 6b7be17eedd9c4a749a999217fcc2ce40db0bbf6 (patch) | |
tree | 8c89e3a0a0b08813ee2f84d90158dae6e7b68c1d /usr.sbin/fdwrite | |
parent | 243ae6f45d3a30777acca46363e034656e96a9df (diff) | |
download | FreeBSD-src-6b7be17eedd9c4a749a999217fcc2ce40db0bbf6.zip FreeBSD-src-6b7be17eedd9c4a749a999217fcc2ce40db0bbf6.tar.gz |
Now that we've got it, use FDOPT_NOERRLOG for fdformat and fdwrite to
avoid blasting the syslog with error messages from bad floppies. Both
tools have their own error reporting anyway (which could easily be
cluttered by the syslog output on your terminal).
Diffstat (limited to 'usr.sbin/fdwrite')
-rw-r--r-- | usr.sbin/fdwrite/fdwrite.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/fdwrite/fdwrite.c b/usr.sbin/fdwrite/fdwrite.c index 0a40ada..d5908f3 100644 --- a/usr.sbin/fdwrite/fdwrite.c +++ b/usr.sbin/fdwrite/fdwrite.c @@ -66,7 +66,7 @@ main(int argc, char **argv) { int inputfd = -1, c, fdn = 0, i,j,fd; int bpt, verbose=1, nbytes=0, track; - int interactive = 1; + int interactive = 1, fdopts; char *device= "/dev/fd0", *trackbuf = 0,*vrfybuf = 0; struct fd_type fdt; FILE *tty; @@ -129,6 +129,9 @@ main(int argc, char **argv) if(ioctl(fd, FD_GTYPE, &fdt) < 0) errx(1, "not a floppy disk: %s", device); + fdopts = FDOPT_NOERRLOG; + if (ioctl(fd, FD_SOPTS, &fdopts) == -1) + err(1, "ioctl(FD_SOPTS, FDOPT_NOERRLOG)"); bpt = fdt.sectrac * (1<<fdt.secsize) * 128; if(!trackbuf) { |