From owner-svn-src-all@FreeBSD.ORG Tue Dec 13 09:01:46 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 068C8106564A; Tue, 13 Dec 2011 09:01:46 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 578708FC20; Tue, 13 Dec 2011 09:01:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBD91iO0041320; Tue, 13 Dec 2011 09:01:44 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBD91ivU041318; Tue, 13 Dec 2011 09:01:44 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201112130901.pBD91ivU041318@svn.freebsd.org> From: Ed Schouten Date: Tue, 13 Dec 2011 09:01:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228458 - head/sbin/dumpfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Dec 2011 09:01:46 -0000 Author: ed Date: Tue Dec 13 09:01:44 2011 New Revision: 228458 URL: http://svn.freebsd.org/changeset/base/228458 Log: Staticify dumpfs. This tool only consists of a single C file, so we can simply mark everything except main() static. This seems to shave off about 8% of the binary size. Modified: head/sbin/dumpfs/dumpfs.c Modified: head/sbin/dumpfs/dumpfs.c ============================================================================== --- head/sbin/dumpfs/dumpfs.c Tue Dec 13 08:23:03 2011 (r228457) +++ head/sbin/dumpfs/dumpfs.c Tue Dec 13 09:01:44 2011 (r228458) @@ -79,16 +79,16 @@ static const char rcsid[] = static struct uufsd disk; -int dumpfs(const char *); -int dumpfsid(void); -int dumpcg(void); -int dumpfreespace(const char *, int); -void dumpfreespacecg(int); -int marshal(const char *); -void pbits(void *, int); -void pblklist(void *, int, off_t, int); -void ufserr(const char *); -void usage(void) __dead2; +static int dumpfs(const char *); +static int dumpfsid(void); +static int dumpcg(void); +static int dumpfreespace(const char *, int); +static void dumpfreespacecg(int); +static int marshal(const char *); +static void pbits(void *, int); +static void pblklist(void *, int, off_t, int); +static void ufserr(const char *); +static void usage(void) __dead2; int main(int argc, char *argv[]) @@ -143,7 +143,7 @@ main(int argc, char *argv[]) exit(eval); } -int +static int dumpfsid(void) { @@ -151,7 +151,7 @@ dumpfsid(void) return 0; } -int +static int dumpfs(const char *name) { time_t fstime; @@ -309,7 +309,7 @@ err: ufserr(name); return (1); } -int +static int dumpcg(void) { time_t cgtime; @@ -370,7 +370,7 @@ dumpcg(void) return (0); } -int +static int dumpfreespace(const char *name, int fflag) { int i; @@ -386,7 +386,7 @@ err: return (1); } -void +static void dumpfreespacecg(int fflag) { @@ -394,7 +394,7 @@ dumpfreespacecg(int fflag) fflag); } -int +static int marshal(const char *name) { struct fs *fs; @@ -444,7 +444,7 @@ marshal(const char *name) return 0; } -void +static void pbits(void *vp, int max) { int i; @@ -466,7 +466,7 @@ pbits(void *vp, int max) printf("\n"); } -void +static void pblklist(void *vp, int max, off_t offset, int fflag) { int i, j; @@ -487,7 +487,7 @@ pblklist(void *vp, int max, off_t offset } } -void +static void ufserr(const char *name) { if (disk.d_error != NULL) @@ -496,7 +496,7 @@ ufserr(const char *name) warn("%s", name); } -void +static void usage(void) { (void)fprintf(stderr, "usage: dumpfs [-fm] filesys | device\n");