diff options
author | Eric Andersen <andersen@codepoet.org> | 2001-03-09 21:24:12 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2001-03-09 21:24:12 +0000 |
commit | 3e6ff9017f5aa4ea41de2520a3f6d29fb20e0332 (patch) | |
tree | c9e6d3d695cbb2449132428a32fb6c309aad870f /util-linux | |
parent | dd91724aa089e344d0f05e40a338dcce481c1845 (diff) | |
download | busybox-w32-3e6ff9017f5aa4ea41de2520a3f6d29fb20e0332.tar.gz busybox-w32-3e6ff9017f5aa4ea41de2520a3f6d29fb20e0332.tar.bz2 busybox-w32-3e6ff9017f5aa4ea41de2520a3f6d29fb20e0332.zip |
A cleanup patch from Jeff Garzik to static-ify a number of
namespace polluting things that really should be static.
Diffstat (limited to 'util-linux')
-rw-r--r-- | util-linux/fbset.c | 2 | ||||
-rw-r--r-- | util-linux/fsck_minix.c | 4 | ||||
-rw-r--r-- | util-linux/getopt.c | 21 | ||||
-rw-r--r-- | util-linux/mkfs_minix.c | 2 | ||||
-rw-r--r-- | util-linux/mkswap.c | 2 | ||||
-rw-r--r-- | util-linux/mount.c | 2 | ||||
-rw-r--r-- | util-linux/nfsmount.c | 2 | ||||
-rw-r--r-- | util-linux/rdate.c | 6 | ||||
-rw-r--r-- | util-linux/swaponoff.c | 4 |
9 files changed, 22 insertions, 23 deletions
diff --git a/util-linux/fbset.c b/util-linux/fbset.c index be1e3c3f1..80711ec9f 100644 --- a/util-linux/fbset.c +++ b/util-linux/fbset.c | |||
@@ -132,7 +132,7 @@ struct fb_var_screeninfo { | |||
132 | }; | 132 | }; |
133 | 133 | ||
134 | 134 | ||
135 | struct cmdoptions_t { | 135 | static struct cmdoptions_t { |
136 | char *name; | 136 | char *name; |
137 | unsigned char param_count; | 137 | unsigned char param_count; |
138 | unsigned char code; | 138 | unsigned char code; |
diff --git a/util-linux/fsck_minix.c b/util-linux/fsck_minix.c index 9a53a705e..bd0c8a61c 100644 --- a/util-linux/fsck_minix.c +++ b/util-linux/fsck_minix.c | |||
@@ -701,7 +701,7 @@ static void read_tables(void) | |||
701 | } | 701 | } |
702 | } | 702 | } |
703 | 703 | ||
704 | struct minix_inode *get_inode(unsigned int nr) | 704 | static struct minix_inode *get_inode(unsigned int nr) |
705 | { | 705 | { |
706 | struct minix_inode *inode; | 706 | struct minix_inode *inode; |
707 | 707 | ||
@@ -749,7 +749,7 @@ struct minix_inode *get_inode(unsigned int nr) | |||
749 | } | 749 | } |
750 | 750 | ||
751 | #ifdef BB_FEATURE_MINIX2 | 751 | #ifdef BB_FEATURE_MINIX2 |
752 | struct minix2_inode *get_inode2(unsigned int nr) | 752 | static struct minix2_inode *get_inode2(unsigned int nr) |
753 | { | 753 | { |
754 | struct minix2_inode *inode; | 754 | struct minix2_inode *inode; |
755 | 755 | ||
diff --git a/util-linux/getopt.c b/util-linux/getopt.c index eb28d5d07..b74dd65a1 100644 --- a/util-linux/getopt.c +++ b/util-linux/getopt.c | |||
@@ -62,20 +62,19 @@ typedef enum {BASH,TCSH} shell_t; | |||
62 | 62 | ||
63 | 63 | ||
64 | /* Some global variables that tells us how to parse. */ | 64 | /* Some global variables that tells us how to parse. */ |
65 | shell_t shell=BASH; /* The shell we generate output for. */ | 65 | static shell_t shell=BASH; /* The shell we generate output for. */ |
66 | int quiet_errors=0; /* 0 is not quiet. */ | 66 | static int quiet_errors=0; /* 0 is not quiet. */ |
67 | int quiet_output=0; /* 0 is not quiet. */ | 67 | static int quiet_output=0; /* 0 is not quiet. */ |
68 | int quote=1; /* 1 is do quote. */ | 68 | static int quote=1; /* 1 is do quote. */ |
69 | int alternative=0; /* 0 is getopt_long, 1 is getopt_long_only */ | 69 | static int alternative=0; /* 0 is getopt_long, 1 is getopt_long_only */ |
70 | 70 | ||
71 | /* Function prototypes */ | 71 | /* Function prototypes */ |
72 | const char *normalize(const char *arg); | 72 | static const char *normalize(const char *arg); |
73 | int generate_output(char * argv[],int argc,const char *optstr, | 73 | static int generate_output(char * argv[],int argc,const char *optstr, |
74 | const struct option *longopts); | 74 | const struct option *longopts); |
75 | void add_long_options(char *options); | 75 | static void add_long_options(char *options); |
76 | void add_longopt(const char *name,int has_arg); | 76 | static void add_longopt(const char *name,int has_arg); |
77 | void set_shell(const char *new_shell); | 77 | static void set_shell(const char *new_shell); |
78 | void set_initial_shell(void); | ||
79 | 78 | ||
80 | 79 | ||
81 | /* | 80 | /* |
diff --git a/util-linux/mkfs_minix.c b/util-linux/mkfs_minix.c index 928a49674..a83fa7961 100644 --- a/util-linux/mkfs_minix.c +++ b/util-linux/mkfs_minix.c | |||
@@ -609,7 +609,7 @@ static void setup_tables(void) | |||
609 | * Perform a test of a block; return the number of | 609 | * Perform a test of a block; return the number of |
610 | * blocks readable/writeable. | 610 | * blocks readable/writeable. |
611 | */ | 611 | */ |
612 | long do_check(char *buffer, int try, unsigned int current_block) | 612 | static long do_check(char *buffer, int try, unsigned int current_block) |
613 | { | 613 | { |
614 | long got; | 614 | long got; |
615 | 615 | ||
diff --git a/util-linux/mkswap.c b/util-linux/mkswap.c index b5153f623..f72c7009a 100644 --- a/util-linux/mkswap.c +++ b/util-linux/mkswap.c | |||
@@ -72,7 +72,7 @@ static int version = -1; | |||
72 | static int pagesize; | 72 | static int pagesize; |
73 | static int *signature_page; | 73 | static int *signature_page; |
74 | 74 | ||
75 | struct swap_header_v1 { | 75 | static struct swap_header_v1 { |
76 | char bootbits[1024]; /* Space for disklabel etc. */ | 76 | char bootbits[1024]; /* Space for disklabel etc. */ |
77 | unsigned int version; | 77 | unsigned int version; |
78 | unsigned int last_page; | 78 | unsigned int last_page; |
diff --git a/util-linux/mount.c b/util-linux/mount.c index fd68dafd6..a2d6053c0 100644 --- a/util-linux/mount.c +++ b/util-linux/mount.c | |||
@@ -231,7 +231,7 @@ parse_mount_options(char *options, int *flags, char *strflags) | |||
231 | } | 231 | } |
232 | } | 232 | } |
233 | 233 | ||
234 | int | 234 | static int |
235 | mount_one(char *blockDevice, char *directory, char *filesystemType, | 235 | mount_one(char *blockDevice, char *directory, char *filesystemType, |
236 | unsigned long flags, char *string_flags, int useMtab, int fakeIt, | 236 | unsigned long flags, char *string_flags, int useMtab, int fakeIt, |
237 | char *mtab_opts, int whineOnErrors) | 237 | char *mtab_opts, int whineOnErrors) |
diff --git a/util-linux/nfsmount.c b/util-linux/nfsmount.c index aee496980..cd815102c 100644 --- a/util-linux/nfsmount.c +++ b/util-linux/nfsmount.c | |||
@@ -886,7 +886,7 @@ static char *nfs_strerror(int stat) | |||
886 | return buf; | 886 | return buf; |
887 | } | 887 | } |
888 | 888 | ||
889 | bool_t | 889 | static bool_t |
890 | xdr_fhandle (XDR *xdrs, fhandle objp) | 890 | xdr_fhandle (XDR *xdrs, fhandle objp) |
891 | { | 891 | { |
892 | //register int32_t *buf; | 892 | //register int32_t *buf; |
diff --git a/util-linux/rdate.c b/util-linux/rdate.c index ed7121a75..28e87323d 100644 --- a/util-linux/rdate.c +++ b/util-linux/rdate.c | |||
@@ -39,10 +39,10 @@ | |||
39 | 39 | ||
40 | static const int RFC_868_BIAS = 2208988800UL; | 40 | static const int RFC_868_BIAS = 2208988800UL; |
41 | 41 | ||
42 | int setdate= 0; | 42 | static int setdate= 0; |
43 | int printdate= 0; | 43 | static int printdate= 0; |
44 | 44 | ||
45 | time_t askremotedate(char *host) | 45 | static time_t askremotedate(char *host) |
46 | { | 46 | { |
47 | struct hostent *h; | 47 | struct hostent *h; |
48 | struct sockaddr_in sin; | 48 | struct sockaddr_in sin; |
diff --git a/util-linux/swaponoff.c b/util-linux/swaponoff.c index 9deb13a28..55022ae3b 100644 --- a/util-linux/swaponoff.c +++ b/util-linux/swaponoff.c | |||
@@ -33,8 +33,8 @@ | |||
33 | #include <linux/unistd.h> | 33 | #include <linux/unistd.h> |
34 | #include "busybox.h" | 34 | #include "busybox.h" |
35 | 35 | ||
36 | _syscall2(int, swapon, const char *, path, int, flags); | 36 | static _syscall2(int, swapon, const char *, path, int, flags); |
37 | _syscall1(int, swapoff, const char *, path); | 37 | static _syscall1(int, swapoff, const char *, path); |
38 | 38 | ||
39 | 39 | ||
40 | static int whichApp; | 40 | static int whichApp; |