From owner-cvs-src@FreeBSD.ORG Sun Jul 3 01:11:46 2005 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5415F16ADB9; Sun, 3 Jul 2005 00:58:42 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id D037444732; Sun, 3 Jul 2005 00:43:27 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id E4F0C6DD84; Sat, 2 Jul 2005 17:38:17 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id 8428A5C9E7 for ; Wed, 26 Jan 2005 07:17:33 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 71C7556630 for ; Wed, 26 Jan 2005 15:17:33 +0000 (GMT) (envelope-from owner-src-committers@FreeBSD.org) Received: by hub.freebsd.org (Postfix) id A126816A53D; Wed, 26 Jan 2005 15:17:28 +0000 (GMT) Delivered-To: ps@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 538) id 2F44816A4D0; Wed, 26 Jan 2005 15:17:27 +0000 (GMT) Delivered-To: src-committers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1B4FF16A4CE; Wed, 26 Jan 2005 15:17:26 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0406E43D45; Wed, 26 Jan 2005 15:17:26 +0000 (GMT) (envelope-from delphij@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j0QFHPOi047711; Wed, 26 Jan 2005 15:17:25 GMT (envelope-from delphij@repoman.freebsd.org) Received: (from delphij@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j0QFHPDh047710; Wed, 26 Jan 2005 15:17:25 GMT (envelope-from delphij) Message-Id: <200501261517.j0QFHPDh047710@repoman.freebsd.org> From: Xin LI To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Sender: owner-src-committers@FreeBSD.org Precedence: bulk X-Loop: FreeBSD.ORG X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on elvis.mu.org X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.0.1 X-Spam-Level: Cc: Subject: cvs commit: src/usr.bin/fsync fsync.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 01:11:47 -0000 X-Original-Date: Wed, 26 Jan 2005 15:17:25 +0000 (UTC) X-List-Received-Date: Sun, 03 Jul 2005 01:11:47 -0000 delphij 2005-01-26 15:17:25 UTC FreeBSD src repository Modified files: usr.bin/fsync fsync.c Log: Correct some style nits that I have mistakenly submitted as suggestions which result in the last revision[*]: - style(9) and sysexits(3) suggests that we use EX_* as exit values, instead of some other values like those returned from a system call as errno. Additionally, follow Ruslan's suggestion about style(9) and other style improvements: - Since open(2) says that it returns -1 on errors, explicitly determine whether it is returning -1 rather than whether the return value is less than zero. - Only set rval when there is no previous error. This distinguishes the first error that occours. - Use exit() in favor of return in main(), this is suggested in old style(9), while the evolve has fade the suggestion. - Add some NOTREACHED comments. - Add blank line after first { because no local variables in usage() Thanks to Ruslan for his tireless explaining of the code standards and knowledge of the history of style(9). [*] Pointy hat to: me Submitted by: ru (with some minor changes) Discussed with: ru, ssouhlal Revision Changes Path 1.7 +15 -9 src/usr.bin/fsync/fsync.c