From owner-svn-src-all@FreeBSD.ORG Sat Dec 10 18:27:56 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 EF0DA1065672; Sat, 10 Dec 2011 18:27:55 +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 D52EF8FC12; Sat, 10 Dec 2011 18:27:55 +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 pBAIRtMa017056; Sat, 10 Dec 2011 18:27:55 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBAIRtg3017051; Sat, 10 Dec 2011 18:27:55 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201112101827.pBAIRtg3017051@svn.freebsd.org> From: Ed Schouten Date: Sat, 10 Dec 2011 18:27:55 +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: r228396 - head/usr.bin/truss 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: Sat, 10 Dec 2011 18:27:56 -0000 Author: ed Date: Sat Dec 10 18:27:55 2011 New Revision: 228396 URL: http://svn.freebsd.org/changeset/base/228396 Log: Add more static keywords to truss(1) source code. There are some tables in the source code that are only used by the individual source files themselves. Therefore there is no need to export them. Modified: head/usr.bin/truss/amd64-linux32.c head/usr.bin/truss/i386-linux.c head/usr.bin/truss/main.c head/usr.bin/truss/syscalls.c Modified: head/usr.bin/truss/amd64-linux32.c ============================================================================== --- head/usr.bin/truss/amd64-linux32.c Sat Dec 10 18:21:03 2011 (r228395) +++ head/usr.bin/truss/amd64-linux32.c Sat Dec 10 18:27:55 2011 (r228396) @@ -228,7 +228,7 @@ amd64_linux32_syscall_entry(struct truss /* * Linux syscalls return negative errno's, we do positive and map them */ -const int bsd_to_linux_errno[] = { +static const int bsd_to_linux_errno[] = { -0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -35, -12, -13, -14, -15, -16, -17, -18, -19, -20, -21, -22, -23, -24, -25, -26, -27, -28, -29, Modified: head/usr.bin/truss/i386-linux.c ============================================================================== --- head/usr.bin/truss/i386-linux.c Sat Dec 10 18:21:03 2011 (r228395) +++ head/usr.bin/truss/i386-linux.c Sat Dec 10 18:27:55 2011 (r228396) @@ -228,7 +228,7 @@ i386_linux_syscall_entry(struct trussinf /* * Linux syscalls return negative errno's, we do positive and map them */ -const int bsd_to_linux_errno[] = { +static const int bsd_to_linux_errno[] = { -0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -35, -12, -13, -14, -15, -16, -17, -18, -19, -20, -21, -22, -23, -24, -25, -26, -27, -28, -29, Modified: head/usr.bin/truss/main.c ============================================================================== --- head/usr.bin/truss/main.c Sat Dec 10 18:21:03 2011 (r228395) +++ head/usr.bin/truss/main.c Sat Dec 10 18:27:55 2011 (r228396) @@ -74,7 +74,7 @@ usage(void) * WARNING! "FreeBSD a.out" must be first, or set_etype will not * work correctly. */ -struct ex_types { +static struct ex_types { const char *type; void (*enter_syscall)(struct trussinfo *, int); long (*exit_syscall)(struct trussinfo *, int); Modified: head/usr.bin/truss/syscalls.c ============================================================================== --- head/usr.bin/truss/syscalls.c Sat Dec 10 18:21:03 2011 (r228395) +++ head/usr.bin/truss/syscalls.c Sat Dec 10 18:27:55 2011 (r228396) @@ -89,7 +89,7 @@ static const char rcsid[] = /* * This should probably be in its own file, sorted alphabetically. */ -struct syscall syscalls[] = { +static struct syscall syscalls[] = { { .name = "fcntl", .ret_type = 1, .nargs = 3, .args = { { Int, 0 } , { Fcntl, 1 }, { Fcntlflag | OUT, 2 } } }, { .name = "fork", .ret_type = 1, .nargs = 0 }, @@ -283,7 +283,7 @@ static struct xlat kevent_flags[] = { X(EV_CLEAR) X(EV_FLAG1) X(EV_ERROR) X(EV_EOF) XEND }; -struct xlat poll_flags[] = { +static struct xlat poll_flags[] = { X(POLLSTANDARD) X(POLLIN) X(POLLPRI) X(POLLOUT) X(POLLERR) X(POLLHUP) X(POLLNVAL) X(POLLRDNORM) X(POLLRDBAND) X(POLLWRBAND) X(POLLINIGNEOF) XEND