diff options
Diffstat (limited to 'usr.bin/quota/quota.c')
-rw-r--r-- | usr.bin/quota/quota.c | 72 |
1 files changed, 20 insertions, 52 deletions
diff --git a/usr.bin/quota/quota.c b/usr.bin/quota/quota.c index 5170f244a2d..e284ae6a727 100644 --- a/usr.bin/quota/quota.c +++ b/usr.bin/quota/quota.c @@ -1,4 +1,4 @@ -/* $OpenBSD: quota.c,v 1.22 2003/06/03 02:56:14 millert Exp $ */ +/* $OpenBSD: quota.c,v 1.23 2003/06/10 22:20:49 deraadt Exp $ */ /* * Copyright (c) 1980, 1990, 1993 @@ -41,7 +41,7 @@ static const char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)quota.c 8.1 (Berkeley) 6/6/93";*/ static const char rcsid[] = -"$OpenBSD: quota.c,v 1.22 2003/06/03 02:56:14 millert Exp $"; +"$OpenBSD: quota.c,v 1.23 2003/06/10 22:20:49 deraadt Exp $"; #endif /* not lint */ /* @@ -105,9 +105,7 @@ int qflag; int vflag; int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { int ngroups; gid_t mygid, gidset[NGROUPS]; @@ -179,7 +177,7 @@ main(argc, argv) } void -usage() +usage(void) { fprintf(stderr, "%s\n%s\n%s\n", @@ -193,8 +191,7 @@ usage() * Print out quotas for a specified user identifier. */ void -showuid(uid) - uid_t uid; +showuid(uid_t uid) { struct passwd *pwd = getpwuid(uid); uid_t myuid; @@ -216,8 +213,7 @@ showuid(uid) * Print out quotas for a specified user name. */ void -showusrname(name) - const char *name; +showusrname(const char *name) { struct passwd *pwd = getpwnam(name); uid_t myuid; @@ -239,8 +235,7 @@ showusrname(name) * Print out quotas for a specified group identifier. */ void -showgid(gid) - gid_t gid; +showgid(gid_t gid) { struct group *grp = getgrgid(gid); int ngroups; @@ -274,8 +269,7 @@ showgid(gid) * Print out quotas for a specified group name. */ void -showgrpname(name) - const char *name; +showgrpname(const char *name) { struct group *grp = getgrnam(name); int ngroups; @@ -306,10 +300,7 @@ showgrpname(name) } void -showquotas(type, id, name) - int type; - u_long id; - const char *name; +showquotas(int type, u_long id, const char *name) { struct quotause *qup; struct quotause *quplist; @@ -396,10 +387,7 @@ showquotas(type, id, name) } void -heading(type, id, name, tag) - int type; - u_long id; - const char *name, *tag; +heading(int type, u_long id, const char *name, const char *tag) { printf("Disk quotas for %s %s (%cid %ld): %s\n", qfextension[type], @@ -422,8 +410,7 @@ heading(type, id, name, tag) * Calculate the grace period and return a printable string for it. */ char * -timeprt(seconds) - time_t seconds; +timeprt(time_t seconds) { time_t hours, minutes; static char buf[20]; @@ -454,9 +441,7 @@ timeprt(seconds) * Collect the requested quota information. */ struct quotause * -getprivs(id, quotatype) - long id; - int quotatype; +getprivs(long id, int quotatype) { struct quotause *qup, *quptail; struct fstab *fs; @@ -516,10 +501,7 @@ getprivs(id, quotatype) * Check to see if a particular quota is to be enabled. */ int -ufshasquota(fs, type, qfnamep) - struct fstab *fs; - int type; - char **qfnamep; +ufshasquota(struct fstab *fs, int type, char **qfnamep) { static char initname, usrname[100], grpname[100]; static char buf[BUFSIZ]; @@ -556,12 +538,8 @@ ufshasquota(fs, type, qfnamep) } int -getufsquota(fst, fs, qup, id, quotatype) - struct statfs *fst; - struct fstab *fs; - struct quotause *qup; - long id; - int quotatype; +getufsquota(struct statfs *fst, struct fstab *fs, struct quotause *qup, + long id, int quotatype) { char *qfpathname; int fd, qcmd; @@ -597,12 +575,8 @@ getufsquota(fst, fs, qup, id, quotatype) } int -getnfsquota(fst, fs, qup, id, quotatype) - struct statfs *fst; - struct fstab *fs; - struct quotause *qup; - long id; - int quotatype; +getnfsquota(struct statfs *fst, struct fstab *fs, struct quotause *qup, + long id, int quotatype) { struct getquota_args gq_args; struct getquota_rslt gq_rslt; @@ -684,13 +658,8 @@ getnfsquota(fst, fs, qup, id, quotatype) } int -callaurpc(host, prognum, versnum, procnum, inproc, in, outproc, out) - char *host; - int prognum, versnum, procnum; - xdrproc_t inproc; - void *in; - xdrproc_t outproc; - void *out; +callaurpc(char *host, int prognum, int versnum, int procnum, + xdrproc_t inproc, void *in, xdrproc_t outproc, void *out) { struct sockaddr_in server_addr; enum clnt_stat clnt_stat; @@ -724,8 +693,7 @@ callaurpc(host, prognum, versnum, procnum, inproc, in, outproc, out) } int -alldigits(s) - char *s; +alldigits(char *s) { int c; |