aboutsummaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
authorandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2001-03-09 21:24:12 +0000
committerandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2001-03-09 21:24:12 +0000
commit1ac3737b2be159605be497acba46eb6ebc0de450 (patch)
treec9e6d3d695cbb2449132428a32fb6c309aad870f /util-linux
parent1f5b759db15ea574fdb31e86b8916835dbd43dbe (diff)
downloadbusybox-w32-1ac3737b2be159605be497acba46eb6ebc0de450.tar.gz
busybox-w32-1ac3737b2be159605be497acba46eb6ebc0de450.tar.bz2
busybox-w32-1ac3737b2be159605be497acba46eb6ebc0de450.zip
A cleanup patch from Jeff Garzik to static-ify a number of
namespace polluting things that really should be static. git-svn-id: svn://busybox.net/trunk/busybox@2027 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'util-linux')
-rw-r--r--util-linux/fbset.c2
-rw-r--r--util-linux/fsck_minix.c4
-rw-r--r--util-linux/getopt.c21
-rw-r--r--util-linux/mkfs_minix.c2
-rw-r--r--util-linux/mkswap.c2
-rw-r--r--util-linux/mount.c2
-rw-r--r--util-linux/nfsmount.c2
-rw-r--r--util-linux/rdate.c6
-rw-r--r--util-linux/swaponoff.c4
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
135struct cmdoptions_t { 135static 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
704struct minix_inode *get_inode(unsigned int nr) 704static 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
752struct minix2_inode *get_inode2(unsigned int nr) 752static 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. */
65shell_t shell=BASH; /* The shell we generate output for. */ 65static shell_t shell=BASH; /* The shell we generate output for. */
66int quiet_errors=0; /* 0 is not quiet. */ 66static int quiet_errors=0; /* 0 is not quiet. */
67int quiet_output=0; /* 0 is not quiet. */ 67static int quiet_output=0; /* 0 is not quiet. */
68int quote=1; /* 1 is do quote. */ 68static int quote=1; /* 1 is do quote. */
69int alternative=0; /* 0 is getopt_long, 1 is getopt_long_only */ 69static int alternative=0; /* 0 is getopt_long, 1 is getopt_long_only */
70 70
71/* Function prototypes */ 71/* Function prototypes */
72const char *normalize(const char *arg); 72static const char *normalize(const char *arg);
73int generate_output(char * argv[],int argc,const char *optstr, 73static int generate_output(char * argv[],int argc,const char *optstr,
74 const struct option *longopts); 74 const struct option *longopts);
75void add_long_options(char *options); 75static void add_long_options(char *options);
76void add_longopt(const char *name,int has_arg); 76static void add_longopt(const char *name,int has_arg);
77void set_shell(const char *new_shell); 77static void set_shell(const char *new_shell);
78void 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 */
612long do_check(char *buffer, int try, unsigned int current_block) 612static 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;
72static int pagesize; 72static int pagesize;
73static int *signature_page; 73static int *signature_page;
74 74
75struct swap_header_v1 { 75static 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
234int 234static int
235mount_one(char *blockDevice, char *directory, char *filesystemType, 235mount_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
889bool_t 889static bool_t
890xdr_fhandle (XDR *xdrs, fhandle objp) 890xdr_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
40static const int RFC_868_BIAS = 2208988800UL; 40static const int RFC_868_BIAS = 2208988800UL;
41 41
42int setdate= 0; 42static int setdate= 0;
43int printdate= 0; 43static int printdate= 0;
44 44
45time_t askremotedate(char *host) 45static 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); 36static _syscall2(int, swapon, const char *, path, int, flags);
37_syscall1(int, swapoff, const char *, path); 37static _syscall1(int, swapoff, const char *, path);
38 38
39 39
40static int whichApp; 40static int whichApp;