Date: Wed, 26 Oct 2005 08:19:37 GMT From: Peter Wemm <peter@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 85885 for review Message-ID: <200510260819.j9Q8JbPn099899@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=85885 Change 85885 by peter@peter_overcee on 2005/10/26 08:18:45 Fix fdcontrol to actually work. can't set params in readonly mode. fdread can't set params either, so it has to O_RDWR. Affected files ... .. //depot/projects/hammer/usr.sbin/fdcontrol/fdcontrol.c#6 edit .. //depot/projects/hammer/usr.sbin/fdread/fdread.c#3 edit Differences ... ==== //depot/projects/hammer/usr.sbin/fdcontrol/fdcontrol.c#6 (text+ko) ==== @@ -120,7 +120,6 @@ mode = O_RDONLY | O_NONBLOCK; else mode = O_RDWR; -mode = O_RDONLY | O_NONBLOCK; if((fd = open(argv[0], mode)) < 0) err(EX_UNAVAILABLE, "open(%s)", argv[0]); ==== //depot/projects/hammer/usr.sbin/fdread/fdread.c#3 (text+ko) ==== @@ -149,7 +149,7 @@ err(EX_OSERR, "cannot create output file %s", fname); } - if ((fd = open(_devname, O_RDONLY)) == -1) + if ((fd = open(_devname, O_RDWR)) == -1) err(EX_OSERR, "cannot open device %s", _devname); return (numids? doreadid(fd, numids, trackno): doread(fd, of, _devname));
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200510260819.j9Q8JbPn099899>