diff options
-rw-r--r-- | convertquota.c | 10 | ||||
-rw-r--r-- | edquota.c | 14 | ||||
-rw-r--r-- | quot.c | 4 | ||||
-rw-r--r-- | quota.c | 10 | ||||
-rw-r--r-- | quota_nld.c | 6 | ||||
-rw-r--r-- | quotacheck.c | 20 | ||||
-rw-r--r-- | quotaon.c | 8 | ||||
-rw-r--r-- | quotasync.c | 8 | ||||
-rw-r--r-- | repquota.c | 10 | ||||
-rw-r--r-- | rquota_client.c | 2 | ||||
-rw-r--r-- | rquota_svc.c | 2 | ||||
-rw-r--r-- | set_limits_example.c | 4 | ||||
-rw-r--r-- | setquota.c | 10 |
13 files changed, 54 insertions, 54 deletions
diff --git a/convertquota.c b/convertquota.c index 1e40804..483abf1 100644 --- a/convertquota.c +++ b/convertquota.c @@ -29,12 +29,12 @@ #define ACT_FORMAT 1 /* Convert format from old to new */ #define ACT_ENDIAN 2 /* Convert endianity */ -char *mntpoint; +static char *mntpoint; char *progname; -int ucv, gcv; -struct quota_handle *qn; /* Handle of new file */ -int action; /* Action to be performed */ -int infmt, outfmt; +static int ucv, gcv; +static struct quota_handle *qn; /* Handle of new file */ +static int action; /* Action to be performed */ +static int infmt, outfmt; static void usage(void) { @@ -66,12 +66,12 @@ char *progname; -int flags, quotatype; -int fmt = -1; -char *protoname; -char *dirname; +static int flags, quotatype; +static int fmt = -1; +static char *protoname; +static char *dirname; -void usage(void) +static void usage(void) { #if defined(RPC_SETQUOTA) char *rpcflag = "[-rm] "; @@ -102,7 +102,7 @@ void usage(void) exit(1); } -int parse_options(int argc, char **argv) +static int parse_options(int argc, char **argv) { int ret; struct option long_opts[] = { @@ -190,7 +190,7 @@ int parse_options(int argc, char **argv) return optind; } -void copy_prototype(int argc, char **argv, struct quota_handle **handles) +static void copy_prototype(int argc, char **argv, struct quota_handle **handles) { int ret, protoid, id; struct dquot *protoprivs, *curprivs, *pprivs, *cprivs; @@ -56,8 +56,8 @@ #include "quotasys.h" #define TSIZE 500 -__uint64_t sizes[TSIZE]; -__uint64_t overflow; +static __uint64_t sizes[TSIZE]; +static __uint64_t overflow; static int aflag; static int cflag; @@ -76,10 +76,10 @@ #define FL_SHOW_MNTPOINT 16384 #define FL_SHOW_DEVICE 32768 -int flags, fmt = -1; +static int flags, fmt = -1; char *progname; -void usage(void) +static void usage(void) { errstr( "%s%s%s%s%s", _("Usage: quota [-guqvswim] [-l | [-Q | -A]] [-F quotaformat]\n"), @@ -112,7 +112,7 @@ void usage(void) exit(1); } -void heading(int type, qid_t id, char *name, char *tag) +static void heading(int type, qid_t id, char *name, char *tag) { char *spacehdr; @@ -130,7 +130,7 @@ void heading(int type, qid_t id, char *name, char *tag) } } -void print_fs_location(struct dquot *q) +static void print_fs_location(struct dquot *q) { struct quota_handle *h = q->dq_h; @@ -172,7 +172,7 @@ void print_fs_location(struct dquot *q) } } -int showquotas(int type, qid_t id, int mntcnt, char **mnt) +static int showquotas(int type, qid_t id, int mntcnt, char **mnt) { struct dquot *qlist, *q; char *msgi, *msgb; diff --git a/quota_nld.c b/quota_nld.c index 538702d..de9504e 100644 --- a/quota_nld.c +++ b/quota_nld.c @@ -62,8 +62,8 @@ static struct nla_policy quota_nl_warn_cmd_policy[QUOTA_NL_A_MAX+1] = { #define FL_NODAEMON 4 #define FL_PRINTBELOW 8 -int flags; -DBusConnection *dhandle; +static int flags; +static DBusConnection *dhandle; static const struct option options[] = { { "version", 0, NULL, 'V' }, @@ -75,7 +75,7 @@ static const struct option options[] = { { NULL, 0, NULL, 0 } }; -void show_help(void) +static void show_help(void) { errstr(_("Usage: %s [options]\nOptions are:\n\ -h --help shows this text\n\ diff --git a/quotacheck.c b/quotacheck.c index 7ecf62d..e25e498 100644 --- a/quotacheck.c +++ b/quotacheck.c @@ -62,24 +62,24 @@ struct dirs { #define BITS_SIZE 4 /* sizeof(bits) == 5 */ #define BLIT_RATIO 10 /* Blit in just 1/10 of blit() calls */ -dev_t cur_dev; /* Device we are working on */ -int files_done, dirs_done; +static dev_t cur_dev; /* Device we are working on */ +static int files_done, dirs_done; int flags, fmt = -1, cfmt; /* Options from command line; Quota format to use spec. by user; Actual format to check */ -int uwant, gwant, ucheck, gcheck; /* Does user want to check user/group quota; Do we check user/group quota? */ -char *mntpoint; /* Mountpoint to check */ +static int uwant, gwant, ucheck, gcheck; /* Does user want to check user/group quota; Do we check user/group quota? */ +static char *mntpoint; /* Mountpoint to check */ char *progname; struct util_dqinfo old_info[MAXQUOTAS]; /* Loaded infos */ -char extensions[MAXQUOTAS + 2][20] = INITQFNAMES; /* Extensions depending on quota type */ -char *basenames[] = INITQFBASENAMES; /* Names of quota files */ +static char extensions[MAXQUOTAS + 2][20] = INITQFNAMES; /* Extensions depending on quota type */ +static char *basenames[] = INITQFBASENAMES; /* Names of quota files */ #ifdef DEBUG_MALLOC -size_t malloc_mem = 0; -size_t free_mem = 0; +static size_t malloc_mem = 0; +static size_t free_mem = 0; #endif -struct dquot *dquot_hash[MAXQUOTAS][DQUOTHASHSIZE]; -struct dlinks *links_hash[MAXQUOTAS][DQUOTHASHSIZE]; +static struct dquot *dquot_hash[MAXQUOTAS][DQUOTHASHSIZE]; +static struct dlinks *links_hash[MAXQUOTAS][DQUOTHASHSIZE]; /* * Ok check each memory allocation. @@ -55,11 +55,11 @@ #define FL_STAT 16 #define FL_OFF 32 -int flags, fmt = -1; +static int flags, fmt = -1; char *progname; -char **mntpoints; -int mntcnt; -char *xarg = NULL; +static char **mntpoints; +static int mntcnt; +static char *xarg = NULL; static void usage(void) { diff --git a/quotasync.c b/quotasync.c index 0ce44c9..a9e2dda 100644 --- a/quotasync.c +++ b/quotasync.c @@ -15,9 +15,9 @@ #define FL_GROUP 2 /* sync group quotas */ #define FL_ALL 4 /* sync quotas on all filesystems */ -int flags, fmt = -1; -char **mnt; -int mntcnt; +static int flags, fmt = -1; +static char **mnt; +static int mntcnt; char *progname; static void usage(void) @@ -79,7 +79,7 @@ static int sync_one(int type, char *dev) return quotactl(qcmd, dev, 0, NULL); } -int syncquotas(int type) +static int syncquotas(int type) { struct quota_handle **handles, *h; int i, ret = 0; @@ -38,11 +38,11 @@ #define FL_NOAUTOFS 256 /* Ignore autofs mountpoints */ #define FL_RAWGRACE 512 /* Print grace times in seconds since epoch */ -int flags, fmt = -1; -char **mnt; -int mntcnt; -int cached_dquots; -struct dquot dquot_cache[MAX_CACHE_DQUOTS]; +static int flags, fmt = -1; +static char **mnt; +static int mntcnt; +static int cached_dquots; +static struct dquot dquot_cache[MAX_CACHE_DQUOTS]; char *progname; static void usage(void) diff --git a/rquota_client.c b/rquota_client.c index 53e0579..d67dd25 100644 --- a/rquota_client.c +++ b/rquota_client.c @@ -86,7 +86,7 @@ static inline void cliutil2netdqblk(struct sq_dqblk *n, struct util_dqblk *u) } /* Write appropriate error message */ -int rquota_err(int stat) +static int rquota_err(int stat) { switch (stat) { case -1: diff --git a/rquota_svc.c b/rquota_svc.c index 7ed8524..17a92f4 100644 --- a/rquota_svc.c +++ b/rquota_svc.c @@ -169,7 +169,7 @@ static void parse_options(int argc, char **argv) * good_client checks if an quota client should be allowed to * execute the requested rpc call. */ -int good_client(struct sockaddr_in *addr, ulong rq_proc) +static int good_client(struct sockaddr_in *addr, ulong rq_proc) { #ifdef HOSTS_ACCESS struct request_info req; diff --git a/set_limits_example.c b/set_limits_example.c index 755fb2f..4147bba 100644 --- a/set_limits_example.c +++ b/set_limits_example.c @@ -7,7 +7,7 @@ #include "pot.h" -int copy_user_quota_limits(const char *block_device, uid_t from, uid_t to) +static int copy_user_quota_limits(const char *block_device, uid_t from, uid_t to) { struct dqblk dq; @@ -30,7 +30,7 @@ int copy_user_quota_limits(const char *block_device, uid_t from, uid_t to) } } -int copy_group_quota_limits(const char *block_device, gid_t from, gid_t to) +static int copy_group_quota_limits(const char *block_device, gid_t from, gid_t to) { struct dqblk dq; @@ -37,12 +37,12 @@ #define FL_NO_MIXED_PATHS 512 #define FL_CONTINUE_BATCH 1024 -int flags, fmt = -1; -char **mnt; +static int flags, fmt = -1; +static char **mnt; char *progname; -int mntcnt; -qid_t protoid, id; -struct util_dqblk toset; +static int mntcnt; +static qid_t protoid, id; +static struct util_dqblk toset; /* Print usage information */ static void usage(void) |