From owner-freebsd-bugs@FreeBSD.ORG Fri Feb 18 10:50:23 2005 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E608D16A4D0 for ; Fri, 18 Feb 2005 10:50:23 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9259A43D58 for ; Fri, 18 Feb 2005 10:50:23 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id j1IAoNOu044920 for ; Fri, 18 Feb 2005 10:50:23 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id j1IAoN8Q044909; Fri, 18 Feb 2005 10:50:23 GMT (envelope-from gnats) Resent-Date: Fri, 18 Feb 2005 10:50:23 GMT Resent-Message-Id: <200502181050.j1IAoN8Q044909@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Tony Maher Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9906E16A4D0 for ; 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 ; 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]) j1IAjWd0012928 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Fri, 18 Feb 2005 21:45:32 +1100 Received: from dt.home (localhost [127.0.0.1])id j1IAjUn8001354 for ; 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 To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: bin/77670: fsync(1) command has minor bug X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Tony Maher List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Feb 2005 10:50:24 -0000 >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@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: