diff options
author | 2016-03-01 18:00:42 +0000 | |
---|---|---|
committer | 2016-03-01 18:00:42 +0000 | |
commit | 1691e12a8dcf490a13a8a4b92423aec4489eb0cd (patch) | |
tree | 672afe47f3ce7e03e1b73cbb8b02405518ae6911 | |
parent | remove unneeded includes (diff) | |
download | wireguard-openbsd-1691e12a8dcf490a13a8a4b92423aec4489eb0cd.tar.xz wireguard-openbsd-1691e12a8dcf490a13a8a4b92423aec4489eb0cd.zip |
tidy up function declarations and definitions
from Michal Mazurek, ok tb@
-rw-r--r-- | bin/df/df.c | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/bin/df/df.c b/bin/df/df.c index 0e7a6be362a..589d0e05cd1 100644 --- a/bin/df/df.c +++ b/bin/df/df.c @@ -1,4 +1,4 @@ -/* $OpenBSD: df.c,v 1.55 2016/02/08 16:23:54 mmcc Exp $ */ +/* $OpenBSD: df.c,v 1.56 2016/03/01 18:00:42 mmcc Exp $ */ /* $NetBSD: df.c,v 1.21.2.1 1995/11/01 00:06:11 jtc Exp $ */ /* @@ -49,21 +49,21 @@ extern char *__progname; -char *getmntpt(char *); -int selected(const char *); -void maketypelist(char *); -long regetmntinfo(struct statfs **, long); -void bsdprint(struct statfs *, long, int); -void prtstat(struct statfs *, int, int, int); -void posixprint(struct statfs *, long, int); -int bread(int, off_t, void *, int); -void usage(void); -void prthumanval(long long); -void prthuman(struct statfs *sfsp, unsigned long long); - -int raw_df(char *, struct statfs *); -extern int ffs_df(int, char *, struct statfs *); -extern int e2fs_df(int, char *, struct statfs *); +int bread(int, off_t, void *, int); +static void bsdprint(struct statfs *, long, int); +char *getmntpt(char *); +static void maketypelist(char *); +static void posixprint(struct statfs *, long, int); +static void prthuman(struct statfs *sfsp, unsigned long long); +static void prthumanval(long long); +static void prtstat(struct statfs *, int, int, int); +static long regetmntinfo(struct statfs **, long); +static int selected(const char *); +static __dead void usage(void); + +extern int e2fs_df(int, char *, struct statfs *); +extern int ffs_df(int, char *, struct statfs *); +static int raw_df(char *, struct statfs *); int hflag, iflag, kflag, lflag, nflag, Pflag; char **typelist = NULL; @@ -196,7 +196,7 @@ getmntpt(char *name) static enum { IN_LIST, NOT_IN_LIST } which; -int +static int selected(const char *type) { char **av; @@ -210,7 +210,7 @@ selected(const char *type) return (which == IN_LIST ? 0 : 1); } -void +static void maketypelist(char *fslist) { int i; @@ -251,7 +251,7 @@ maketypelist(char *fslist) * filesystem types not in ``fsmask'' and possibly re-stating to get * current (not cached) info. Returns the new count of valid statfs bufs. */ -long +static long regetmntinfo(struct statfs **mntbufp, long mntsize) { int i, j; @@ -281,7 +281,7 @@ regetmntinfo(struct statfs **mntbufp, long mntsize) * the end. Makes output compact and easy-to-read esp. on huge disks. * Code moved into libutil; this is now just a wrapper. */ -void +static void prthumanval(long long bytes) { char ret[FMT_SCALED_STRSIZE]; @@ -293,7 +293,7 @@ prthumanval(long long bytes) (void)printf(" %7s", ret); } -void +static void prthuman(struct statfs *sfsp, unsigned long long used) { prthumanval(sfsp->f_blocks * sfsp->f_bsize); @@ -312,7 +312,7 @@ prthuman(struct statfs *sfsp, unsigned long long used) /* * Print out status about a filesystem. */ -void +static void prtstat(struct statfs *sfsp, int maxwidth, int headerlen, int blocksize) { u_int64_t used, inodes; @@ -343,7 +343,7 @@ prtstat(struct statfs *sfsp, int maxwidth, int headerlen, int blocksize) /* * Print in traditional BSD format. */ -void +static void bsdprint(struct statfs *mntbuf, long mntsize, int maxwidth) { int i; @@ -380,7 +380,7 @@ bsdprint(struct statfs *mntbuf, long mntsize, int maxwidth) /* * Print in format defined by POSIX 1002.2, invoke with -P option. */ -void +static void posixprint(struct statfs *mntbuf, long mntsize, int maxwidth) { int i; @@ -421,7 +421,7 @@ posixprint(struct statfs *mntbuf, long mntsize, int maxwidth) } } -int +static int raw_df(char *file, struct statfs *sfsp) { int rfd, ret = -1; @@ -456,7 +456,7 @@ bread(int rfd, off_t off, void *buf, int cnt) return (1); } -void +static __dead void usage(void) { (void)fprintf(stderr, |