Submit #2600 » 0001-declare-functions-local-to-df-module-as-static.patch
bin/df/df.c | ||
---|---|---|
int ifree;
|
||
};
|
||
int bread(off_t, void *, int);
|
||
int checkvfsname(const char *, char **);
|
||
char *getmntpt(char *);
|
||
int quadwidth(int64_t);
|
||
char *makenetvfslist(void);
|
||
/* vfslist.c */
|
||
char **makevfslist(char *);
|
||
void prthuman(struct statvfs *, int64_t);
|
||
void prthumanval(int64_t);
|
||
void prtstat(struct statfs *, struct statvfs *, struct maxwidths *);
|
||
long regetmntinfo(struct statfs **, struct statvfs **, long, char **);
|
||
int ufs_df(char *, struct maxwidths *);
|
||
void update_maxwidths(struct maxwidths *, struct statfs *, struct statvfs *);
|
||
void usage(void);
|
||
int checkvfsname(const char *, char **);
|
||
static int bread(off_t, void *, int);
|
||
static char *getmntpt(char *);
|
||
static int quadwidth(int64_t);
|
||
static char *makenetvfslist(void);
|
||
static void prthuman(struct statvfs *, int64_t);
|
||
static void prthumanval(int64_t);
|
||
static void prtstat(struct statfs *, struct statvfs *, struct maxwidths *);
|
||
static long regetmntinfo(struct statfs **, struct statvfs **, long, char **);
|
||
static int ufs_df(char *, struct maxwidths *);
|
||
static void update_maxwidths(struct maxwidths *, struct statfs *, struct statvfs *);
|
||
static void usage(void);
|
||
int aflag = 0, hflag, iflag, nflag;
|
||
struct ufs_args mdev;
|
||
... | ... | |
return (rv);
|
||
}
|
||
char *
|
||
static char *
|
||
getmntpt(char *name)
|
||
{
|
||
long mntsize, i;
|
||
... | ... | |
* filesystem types not in vfslist 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, struct statvfs **mntvbufp, long mntsize, char **vfslist)
|
||
{
|
||
int i, j;
|
||
... | ... | |
return (j);
|
||
}
|
||
void
|
||
static void
|
||
prthuman(struct statvfs *vsfsp, int64_t used)
|
||
{
|
||
prthumanval(vsfsp->f_blocks * vsfsp->f_bsize);
|
||
... | ... | |
prthumanval(vsfsp->f_bavail * vsfsp->f_bsize);
|
||
}
|
||
void
|
||
static void
|
||
prthumanval(int64_t bytes)
|
||
{
|
||
char buf[6];
|
||
... | ... | |
/*
|
||
* Print out status about a filesystem.
|
||
*/
|
||
void
|
||
static void
|
||
prtstat(struct statfs *sfsp, struct statvfs *vsfsp, struct maxwidths *mwp)
|
||
{
|
||
static long blocksize;
|
||
... | ... | |
* Update the maximum field-width information in `mwp' based on
|
||
* the filesystem specified by `sfsp'.
|
||
*/
|
||
void
|
||
static void
|
||
update_maxwidths(struct maxwidths *mwp, struct statfs *sfsp, struct statvfs *vsfsp)
|
||
{
|
||
static long blocksize;
|
||
... | ... | |
}
|
||
/* Return the width in characters of the specified long. */
|
||
int
|
||
static int
|
||
quadwidth(int64_t val)
|
||
{
|
||
int len;
|
||
... | ... | |
int rfd;
|
||
int
|
||
static int
|
||
ufs_df(char *file, struct maxwidths *mwp)
|
||
{
|
||
struct statfs statfsbuf;
|
||
... | ... | |
return (0);
|
||
}
|
||
int
|
||
static int
|
||
bread(off_t off, void *buf, int cnt)
|
||
{
|
||
ssize_t nr;
|
||
... | ... | |
return (1);
|
||
}
|
||
void
|
||
static void
|
||
usage(void)
|
||
{
|
||
... | ... | |
exit(EX_USAGE);
|
||
}
|
||
char *
|
||
static char *
|
||
makenetvfslist(void)
|
||
{
|
||
char *str, *strptr, **listptr;
|