bin/77670: fsync(1) command has minor bug
Tony Maher
tonymaher at optusnet.com.au
Fri Feb 18 10:50:24 GMT 2005
>Number: 77670
>Category: bin
>Synopsis: fsync(1) command has minor bug
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Fri Feb 18 10:50:23 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: Tony Maher
>Release: FreeBSD 5.3-STABLE i386
>Organization:
>Environment:
System: FreeBSD dt.home 5.3-STABLE FreeBSD 5.3-STABLE #2: Thu Feb 10 06:05:23 EST 2005 root at dt.home:/var/obj/usr/src/sys/GENERIC i386
>Description:
While porting fsync(1) to solaris, I noticed what appears to be
a minor bug in /usr/src/usr.bin/fsync/fsync.c
If there is an error when fsync(2) is called it prints out
the first filename on command line rather than the i'th filename.
It looks like a simple typo.
>How-To-Repeat:
>Fix:
--- fsync.c.orig Fri Feb 18 21:35:08 2005
+++ fsync.c Fri Feb 18 21:35:17 2005
@@ -52,7 +52,7 @@
err(1, "open %s", argv[i]);
if (fsync(fd) != 0)
- err(1, "fsync %s", argv[1]);
+ err(1, "fsync %s", argv[i]);
close(fd);
}
return(0);
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list