From tonymaher@optusnet.com.au  Fri Feb 18 10:45:35 2005
Return-Path: <tonymaher@optusnet.com.au>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 9906E16A4D0
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 18 Feb 2005 10:45:35 +0000 (GMT)
Received: from mail20.syd.optusnet.com.au (mail20.syd.optusnet.com.au [211.29.132.201])
	by mx1.FreeBSD.org (Postfix) with ESMTP id A077643D5D
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 18 Feb 2005 10:45:34 +0000 (GMT)
	(envelope-from tonymaher@optusnet.com.au)
Received: from d211-29-164-91.dsl.nsw.optusnet.com.au (d220-236-109-240.dsl.nsw.optusnet.com.au [220.236.109.240])
	by mail20.syd.optusnet.com.au (8.12.11/8.12.11) with ESMTP id j1IAjWd0012928
	(version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO)
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 18 Feb 2005 21:45:32 +1100
Received: from dt.home (localhost [127.0.0.1])
	by d211-29-164-91.dsl.nsw.optusnet.com.au (8.13.1/8.13.1) with ESMTP id j1IAjUn8001354
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 18 Feb 2005 21:45:30 +1100 (EST)
	(envelope-from tonym@dt.home)
Received: (from tonym@localhost)
	by dt.home (8.13.1/8.13.1/Submit) id j1IAbHSI001298;
	Fri, 18 Feb 2005 21:37:17 +1100 (EST)
	(envelope-from tonym)
Message-Id: <200502181037.j1IAbHSI001298@dt.home>
Date: Fri, 18 Feb 2005 21:37:17 +1100 (EST)
From: Tony Maher <tonymaher@optusnet.com.au>
Reply-To: Tony Maher <tonymaher@optusnet.com.au>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: fsync(1) command has minor bug
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         77670
>Category:       bin
>Synopsis:       fsync(1) command has minor bug
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    delphij
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Feb 18 10:50:23 GMT 2005
>Closed-Date:    Fri Feb 18 16:17:31 GMT 2005
>Last-Modified:  Fri Feb 18 16:17:31 GMT 2005
>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@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:
State-Changed-From-To: open->patched 
State-Changed-By: maxim 
State-Changed-When: Fri Feb 18 11:04:47 GMT 2005 
State-Changed-Why:  
The bug was fixed in HEAD, let delphij decide do we want to MFC 
these changes to RELENG_5. 


Responsible-Changed-From-To: freebsd-bugs->delphij 
Responsible-Changed-By: maxim 
Responsible-Changed-When: Fri Feb 18 11:04:47 GMT 2005 
Responsible-Changed-Why:  


http://www.freebsd.org/cgi/query-pr.cgi?pr=77670 
State-Changed-From-To: patched->closed 
State-Changed-By: delphij 
State-Changed-When: Fri Feb 18 16:16:57 GMT 2005 
State-Changed-Why:  
MFC'ed to RELENG_5.  Thanks for your submission! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=77670 
>Unformatted:
