summaryrefslogtreecommitdiffstats
path: root/usr.bin/truss
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2011-12-10 18:27:55 +0000
committered <ed@FreeBSD.org>2011-12-10 18:27:55 +0000
commite886a142d57c040119eec38bb0a9eca53bc3aab4 (patch)
tree28b66a73174e83c1422d09c2315d43ae266e66c3 /usr.bin/truss
parent2547a674dda8cd19c596d9f3b6e3485ce8fc0483 (diff)
downloadFreeBSD-src-e886a142d57c040119eec38bb0a9eca53bc3aab4.zip
FreeBSD-src-e886a142d57c040119eec38bb0a9eca53bc3aab4.tar.gz
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.
Diffstat (limited to 'usr.bin/truss')
-rw-r--r--usr.bin/truss/amd64-linux32.c2
-rw-r--r--usr.bin/truss/i386-linux.c2
-rw-r--r--usr.bin/truss/main.c2
-rw-r--r--usr.bin/truss/syscalls.c4
4 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/truss/amd64-linux32.c b/usr.bin/truss/amd64-linux32.c
index f392a4b..3de40da 100644
--- a/usr.bin/truss/amd64-linux32.c
+++ b/usr.bin/truss/amd64-linux32.c
@@ -228,7 +228,7 @@ amd64_linux32_syscall_entry(struct trussinfo *trussinfo, int nargs) {
/*
* 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,
diff --git a/usr.bin/truss/i386-linux.c b/usr.bin/truss/i386-linux.c
index 8e0aa04..66bccf9 100644
--- a/usr.bin/truss/i386-linux.c
+++ b/usr.bin/truss/i386-linux.c
@@ -228,7 +228,7 @@ i386_linux_syscall_entry(struct trussinfo *trussinfo, int nargs) {
/*
* 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,
diff --git a/usr.bin/truss/main.c b/usr.bin/truss/main.c
index a74fe1c..e04e810 100644
--- a/usr.bin/truss/main.c
+++ b/usr.bin/truss/main.c
@@ -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);
diff --git a/usr.bin/truss/syscalls.c b/usr.bin/truss/syscalls.c
index f19553d2..bcdc6ce 100644
--- a/usr.bin/truss/syscalls.c
+++ b/usr.bin/truss/syscalls.c
@@ -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
OpenPOWER on IntegriCloud