diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-07-03 22:32:35 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-07-03 22:32:35 +0000 |
commit | a9a4354fed4cec65ca359fe04095a7a7d4823a8a (patch) | |
tree | 0fedc69061ae9a279d3db23f185ff0b038a706d9 | |
parent | 4c287e033bc1d7be66ec3f6c6735246a781a9e08 (diff) |
ansi
33 files changed, 381 insertions, 799 deletions
diff --git a/sbin/atactl/atactl.c b/sbin/atactl/atactl.c index ba89873d7b4..356b95c7985 100644 --- a/sbin/atactl/atactl.c +++ b/sbin/atactl/atactl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: atactl.c,v 1.17 2002/06/15 10:59:06 gluk Exp $ */ +/* $OpenBSD: atactl.c,v 1.18 2002/07/03 22:32:32 deraadt Exp $ */ /* $NetBSD: atactl.c,v 1.4 1999/02/24 18:49:14 jwise Exp $ */ /*- @@ -314,9 +314,7 @@ struct valinfo ibm_attr_names[] = { (b4 << 24 | b3 << 16 | b2 << 8 | b1) int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { struct command *cmdp; char dvname_store[MAXPATHLEN]; @@ -368,7 +366,7 @@ main(argc, argv) } void -usage() +usage(void) { fprintf(stderr, "usage: %s device command [arg [...]]\n", @@ -380,8 +378,7 @@ usage() * Wrapper that calls ATAIOCCOMMAND and checks for errors */ void -ata_command(req) - struct atareq *req; +ata_command(struct atareq *req) { int error; @@ -419,10 +416,7 @@ ata_command(req) * Print out strings associated with particular bitmasks */ void -print_bitinfo(f, bits, binfo) - const char *f; - u_int bits; - struct bitinfo *binfo; +print_bitinfo(const char *f, u_int bits, struct bitinfo *binfo) { for (; binfo->bitmask != NULL; binfo++) @@ -436,9 +430,7 @@ print_bitinfo(f, bits, binfo) * if no value found -1 is returned. */ int -strtoval(str, vinfo) - const char *str; - struct valinfo *vinfo; +strtoval(const char *str, struct valinfo *vinfo) { for (; vinfo->string != NULL; vinfo++) if (strcmp(str, vinfo->string) == 0) @@ -452,9 +444,7 @@ strtoval(str, vinfo) * if no string found NULL is returned. */ const char * -valtostr(val, vinfo) - int val; - struct valinfo *vinfo; +valtostr(int val, struct valinfo *vinfo) { for (; vinfo->string != NULL; vinfo++) if (val == vinfo->value) @@ -466,9 +456,7 @@ valtostr(val, vinfo) * DEVICE COMMANDS */ void -device_dump(argc, argv) - int argc; - char *argv[]; +device_dump(int argc, char *argv[]) { unsigned char buf[131072]; int error; @@ -491,9 +479,7 @@ device_dump(argc, argv) * Display the identity of the device */ void -device_identify(argc, argv) - int argc; - char *argv[]; +device_identify(int argc, char *argv[]) { struct ataparams *inqbuf; struct atareq req; @@ -608,9 +594,7 @@ usage: * issue the IDLE IMMEDIATE command to the drive */ void -device_idle(argc, argv) - int argc; - char *argv[]; +device_idle(int argc, char *argv[]) { struct atareq req; @@ -640,9 +624,7 @@ usage: * SMART ENABLE OPERATIONS command */ void -device_smart_enable(argc, argv) - int argc; - char *argv[]; +device_smart_enable(int argc, char *argv[]) { struct atareq req; @@ -668,9 +650,7 @@ usage: * SMART DISABLE OPERATIONS command */ void -device_smart_disable(argc, argv) - int argc; - char *argv[]; +device_smart_disable(int argc, char *argv[]) { struct atareq req; @@ -696,9 +676,7 @@ usage: * SMART STATUS command */ void -device_smart_status(argc, argv) - int argc; - char *argv[]; +device_smart_status(int argc, char *argv[]) { struct atareq req; @@ -734,9 +712,7 @@ usage: * SMART ENABLE/DISABLE ATTRIBUTE AUTOSAVE command */ void -device_smart_autosave(argc, argv) - int argc; - char *argv[]; +device_smart_autosave(int argc, char *argv[]) { struct atareq req; int val; @@ -767,9 +743,7 @@ usage: * SMART EXECUTE OFF-LINE IMMEDIATE command */ void -device_smart_offline(argc, argv) - int argc; - char *argv[]; +device_smart_offline(int argc, char *argv[]) { struct atareq req; int val; @@ -800,9 +774,7 @@ usage: * SMART READ DATA command */ void -device_smart_read(argc, argv) - int argc; - char *argv[]; +device_smart_read(int argc, char *argv[]) { struct atareq req; struct smart_read data; @@ -862,9 +834,7 @@ usage: * SMART READ LOG command */ void -device_smart_readlog(argc, argv) - int argc; - char *argv[]; +device_smart_readlog(int argc, char *argv[]) { struct atareq req; int val; @@ -1042,8 +1012,7 @@ usage: data->cmd[4].reg) void -smart_print_errdata(data) - struct smart_log_errdata *data; +smart_print_errdata(struct smart_log_errdata *data) { printf(" error register: 0x%x\n", data->err.reg_err); printf(" sector count register: 0x%x\n", data->err.reg_seccnt); @@ -1096,9 +1065,7 @@ smart_cksum(data, len) * Read device attributes */ void -device_attr(argc, argv) - int argc; - char *argv[]; +device_attr(int argc, char *argv[]) { struct atareq req; struct smart_read attr_val; @@ -1173,9 +1140,7 @@ device_attr(argc, argv) * Set the automatic acoustic management on the disk. */ void -device_acoustic(argc, argv) - int argc; - char *argv[]; +device_acoustic(int argc, char *argv[]) { unsigned long acoustic; struct atareq req; @@ -1222,9 +1187,7 @@ usage: * to keep a uniform interface to the user. */ void -device_apm(argc, argv) - int argc; - char *argv[]; +device_apm(int argc, char *argv[]) { unsigned long power; struct atareq req; @@ -1271,9 +1234,7 @@ usage: * Management) on the disk. */ void -device_feature(argc, argv) - int argc; - char *argv[]; +device_feature(int argc, char *argv[]) { struct atareq req; @@ -1322,9 +1283,7 @@ usage: * standby mode, depending on how we were invoked. */ void -device_setidle(argc, argv) - int argc; - char *argv[]; +device_setidle(int argc, char *argv[]) { unsigned long idle; struct atareq req; @@ -1380,9 +1339,7 @@ usage: * Query the device for the current power mode */ void -device_checkpower(argc, argv) - int argc; - char *argv[]; +device_checkpower(int argc, char *argv[]) { struct atareq req; diff --git a/sbin/badsect/badsect.c b/sbin/badsect/badsect.c index 74b3662b329..a85d45cb586 100644 --- a/sbin/badsect/badsect.c +++ b/sbin/badsect/badsect.c @@ -1,4 +1,4 @@ -/* $OpenBSD: badsect.c,v 1.8 2002/06/09 08:13:05 todd Exp $ */ +/* $OpenBSD: badsect.c,v 1.9 2002/07/03 22:32:32 deraadt Exp $ */ /* $NetBSD: badsect.c,v 1.10 1995/03/18 14:54:28 cgd Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)badsect.c 8.1 (Berkeley) 6/5/93"; #else -static char rcsid[] = "$OpenBSD: badsect.c,v 1.8 2002/06/09 08:13:05 todd Exp $"; +static char rcsid[] = "$OpenBSD: badsect.c,v 1.9 2002/07/03 22:32:32 deraadt Exp $"; #endif #endif /* not lint */ @@ -93,9 +93,7 @@ void rdfs(daddr_t, int, char *); int chkuse(daddr_t, int); int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { daddr_t number; struct stat stbuf, devstat; @@ -166,9 +164,7 @@ main(argc, argv) } int -chkuse(blkno, cnt) - daddr_t blkno; - int cnt; +chkuse(daddr_t blkno, int cnt) { int cg; daddr_t fsbn, bn; @@ -209,10 +205,7 @@ chkuse(blkno, cnt) * read a block from the file system */ void -rdfs(bno, size, bf) - daddr_t bno; - int size; - char *bf; +rdfs(daddr_t bno, int size, char *bf) { int n; diff --git a/sbin/brconfig/brconfig.c b/sbin/brconfig/brconfig.c index 5edb83627e8..bdf150ce1aa 100644 --- a/sbin/brconfig/brconfig.c +++ b/sbin/brconfig/brconfig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: brconfig.c,v 1.18 2002/07/01 21:43:21 jason Exp $ */ +/* $OpenBSD: brconfig.c,v 1.19 2002/07/03 22:32:32 deraadt Exp $ */ /* * Copyright (c) 1999, 2000 Jason L. Wright (jason@thought.net) @@ -102,7 +102,7 @@ char *stpstates[] = { }; void -usage() +usage(void) { fprintf(stderr, "usage: brconfig -a\n"); fprintf(stderr, @@ -110,9 +110,7 @@ usage() } int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { int error = 0, sock; char *brdg; @@ -427,10 +425,7 @@ main(argc, argv) } int -bridge_ifsetflag(s, brdg, ifsname, flag) - int s; - char *brdg, *ifsname; - u_int32_t flag; +bridge_ifsetflag(int s, char *brdg, char *ifsname, u_int32_t flag) { struct ifbreq req; @@ -451,10 +446,7 @@ bridge_ifsetflag(s, brdg, ifsname, flag) } int -bridge_ifclrflag(s, brdg, ifsname, flag) - int s; - char *brdg, *ifsname; - u_int32_t flag; +bridge_ifclrflag(int s, char *brdg, char *ifsname, u_int32_t flag) { struct ifbreq req; @@ -476,8 +468,7 @@ bridge_ifclrflag(s, brdg, ifsname, flag) } int -bridge_show_all(s) - int s; +bridge_show_all(int s) { char *inbuf = NULL; struct ifconf ifc; @@ -513,10 +504,7 @@ bridge_show_all(s) } int -bridge_setflag(s, brdg, f) - int s; - char *brdg; - short f; +bridge_setflag(int s, char *brdg, short f) { struct ifreq ifr; @@ -542,10 +530,7 @@ bridge_setflag(s, brdg, f) } int -bridge_clrflag(s, brdg, f) - int s; - char *brdg; - short f; +bridge_clrflag(int s, char *brdg, short f) { struct ifreq ifr; @@ -571,9 +556,7 @@ bridge_clrflag(s, brdg, f) } int -bridge_flushall(s, brdg) - int s; - char *brdg; +bridge_flushall(int s, char *brdg) { struct ifbreq req; @@ -587,9 +570,7 @@ bridge_flushall(s, brdg) } int -bridge_flush(s, brdg) - int s; - char *brdg; +bridge_flush(int s, char *brdg) { struct ifbreq req; @@ -603,9 +584,7 @@ bridge_flush(s, brdg) } int -bridge_cfg(s, brdg, delim) - int s; - char *brdg, *delim; +bridge_cfg(int s, char *brdg, char *delim) { struct ifbrparam ifbp; u_int16_t pri; @@ -643,9 +622,7 @@ bridge_cfg(s, brdg, delim) } int -bridge_list(s, brdg, delim) - int s; - char *brdg, *delim; +bridge_list(int s, char *brdg, char *delim) { struct ifbreq *reqp; struct ifbifconf bifc; @@ -685,9 +662,7 @@ bridge_list(s, brdg, delim) } int -bridge_add(s, brdg, ifn) - int s; - char *brdg, *ifn; +bridge_add(int s, char *brdg, char *ifn) { struct ifbreq req; @@ -703,9 +678,7 @@ bridge_add(s, brdg, ifn) } int -bridge_delete(s, brdg, ifn) - int s; - char *brdg, *ifn; +bridge_delete(int s, char *brdg, char *ifn) { struct ifbreq req; @@ -721,9 +694,7 @@ bridge_delete(s, brdg, ifn) } int -bridge_addspan(s, brdg, ifn) - int s; - char *brdg, *ifn; +bridge_addspan(int s, char *brdg, char *ifn) { struct ifbreq req; @@ -739,9 +710,7 @@ bridge_addspan(s, brdg, ifn) } int -bridge_delspan(s, brdg, ifn) - int s; - char *brdg, *ifn; +bridge_delspan(int s, char *brdg, char *ifn) { struct ifbreq req; @@ -757,9 +726,7 @@ bridge_delspan(s, brdg, ifn) } int -bridge_timeout(s, brdg, arg) - int s; - char *brdg, *arg; +bridge_timeout(int s, char *brdg, char *arg) { struct ifbrparam bp; u_int32_t newtime; @@ -783,9 +750,7 @@ bridge_timeout(s, brdg, arg) } int -bridge_maxage(s, brdg, arg) - int s; - char *brdg, *arg; +bridge_maxage(int s, char *brdg, char *arg) { struct ifbrparam bp; u_int32_t v; @@ -810,9 +775,7 @@ bridge_maxage(s, brdg, arg) } int -bridge_priority(s, brdg, arg) - int s; - char *brdg, *arg; +bridge_priority(int s, char *brdg, char *arg) { struct ifbrparam bp; u_int32_t v; @@ -836,9 +799,7 @@ bridge_priority(s, brdg, arg) } int -bridge_fwddelay(s, brdg, arg) - int s; - char *brdg, *arg; +bridge_fwddelay(int s, char *brdg, char *arg) { struct ifbrparam bp; u_int32_t v; @@ -863,9 +824,7 @@ bridge_fwddelay(s, brdg, arg) } int -bridge_hellotime(s, brdg, arg) - int s; - char *brdg, *arg; +bridge_hellotime(int s, char *brdg, char *arg) { struct ifbrparam bp; u_int32_t v; @@ -890,9 +849,7 @@ bridge_hellotime(s, brdg, arg) } int -bridge_maxaddr(s, brdg, arg) - int s; - char *brdg, *arg; +bridge_maxaddr(int s, char *brdg, char *arg) { struct ifbrparam bp; u_int32_t newsize; @@ -916,9 +873,7 @@ bridge_maxaddr(s, brdg, arg) } int -bridge_deladdr(s, brdg, addr) - int s; - char *brdg, *addr; +bridge_deladdr(int s, char *brdg, char *addr) { struct ifbareq ifba; struct ether_addr *ea; @@ -940,9 +895,7 @@ bridge_deladdr(s, brdg, addr) } int -bridge_ifprio(s, brdg, ifname, val) - int s; - char *brdg, *ifname, *val; +bridge_ifprio(int s, char *brdg, char *ifname, char *val) { struct ifbreq breq; u_int32_t v; @@ -968,9 +921,7 @@ bridge_ifprio(s, brdg, ifname, val) } int -bridge_addaddr(s, brdg, ifname, addr) - int s; - char *brdg, *ifname, *addr; +bridge_addaddr(int s, char *brdg, char *ifname, char *addr) { struct ifbareq ifba; struct ether_addr *ea; @@ -995,9 +946,7 @@ bridge_addaddr(s, brdg, ifname, addr) } int -bridge_addrs(s, brdg, delim) - int s; - char *brdg, *delim; +bridge_addrs(int s, char *brdg, char *delim) { struct ifbaconf ifbac; struct ifbareq *ifba; @@ -1036,9 +985,7 @@ bridge_addrs(s, brdg, delim) * Check to make sure 'brdg' is really a bridge interface. */ int -is_bridge(s, brdg) - int s; - char *brdg; +is_bridge(int s, char *brdg) { struct ifreq ifr; struct ifbaconf ifbac; @@ -1059,9 +1006,7 @@ is_bridge(s, brdg) } int -bridge_status(s, brdg) - int s; - char *brdg; +bridge_status(int s, char *brdg) { struct ifreq ifr; struct ifbrparam bp1, bp2; @@ -1109,9 +1054,7 @@ bridge_status(s, brdg) } int -bridge_flushrule(s, brdg, ifname) - int s; - char *brdg, *ifname; +bridge_flushrule(int s, char *brdg, char *ifname) { struct ifbrlreq req; @@ -1125,10 +1068,7 @@ bridge_flushrule(s, brdg, ifname) } int -bridge_rules(s, brdg, ifname, delim) - int s; - char *brdg, *ifname; - char *delim; +bridge_rules(int s, char *brdg, char *ifname, char *delim) { char *inbuf = NULL; struct ifbrlconf ifc; @@ -1157,9 +1097,7 @@ bridge_rules(s, brdg, ifname, delim) } void -bridge_showrule(r, delim) - struct ifbrlreq *r; - char *delim; +bridge_showrule(struct ifbrlreq *r, char *delim) { if (delim) printf("%s ", delim); @@ -1287,9 +1225,7 @@ bad_rule: #define MAXRULEWORDS 8 int -bridge_rulefile(s, brdg, fname) - int s; - char *brdg, *fname; +bridge_rulefile(int s, char *brdg, char *fname) { FILE *f; char *str, *argv[MAXRULEWORDS], buf[1024], xbuf[1024]; @@ -1334,9 +1270,7 @@ bridge_rulefile(s, brdg, fname) } void -bridge_badrule(argc, argv, ln) - int argc, ln; - char **argv; +bridge_badrule(int argc, char *argv[], int ln) { int i; @@ -1354,10 +1288,7 @@ bridge_badrule(argc, argv, ln) * (borrowed from ifconfig.c) */ void -printb(s, v, bits) - char *s; - char *bits; - unsigned short v; +printb(char *s, unsigned short v, char *bits) { int i, any = 0; char c; diff --git a/sbin/clri/clri.c b/sbin/clri/clri.c index 6537c05a307..c3a9b6dd4f8 100644 --- a/sbin/clri/clri.c +++ b/sbin/clri/clri.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clri.c,v 1.6 2001/11/05 07:39:16 mpech Exp $ */ +/* $OpenBSD: clri.c,v 1.7 2002/07/03 22:32:32 deraadt Exp $ */ /* $NetBSD: clri.c,v 1.9 1995/03/18 14:54:33 cgd Exp $ */ /* @@ -47,7 +47,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)clri.c 8.2 (Berkeley) 9/23/93"; #else -static char rcsid[] = "$OpenBSD: clri.c,v 1.6 2001/11/05 07:39:16 mpech Exp $"; +static char rcsid[] = "$OpenBSD: clri.c,v 1.7 2002/07/03 22:32:32 deraadt Exp $"; #endif #endif /* not lint */ @@ -66,9 +66,7 @@ static char rcsid[] = "$OpenBSD: clri.c,v 1.6 2001/11/05 07:39:16 mpech Exp $"; #include <unistd.h> int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { struct fs *sbp; struct dinode *ip; diff --git a/sbin/dmesg/dmesg.c b/sbin/dmesg/dmesg.c index 9e61428bc50..b249688fd09 100644 --- a/sbin/dmesg/dmesg.c +++ b/sbin/dmesg/dmesg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dmesg.c,v 1.15 2002/02/16 21:27:33 millert Exp $ */ +/* $OpenBSD: dmesg.c,v 1.16 2002/07/03 22:32:32 deraadt Exp $ */ /* $NetBSD: dmesg.c,v 1.8 1995/03/18 14:54:49 cgd Exp $ */ /*- @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)dmesg.c 8.1 (Berkeley) 6/5/93"; #else -static char rcsid[] = "$OpenBSD: dmesg.c,v 1.15 2002/02/16 21:27:33 millert Exp $"; +static char rcsid[] = "$OpenBSD: dmesg.c,v 1.16 2002/07/03 22:32:32 deraadt Exp $"; #endif #endif /* not lint */ @@ -76,9 +76,7 @@ void usage(void); kvm_read(kd, addr, &var, sizeof(var)) != sizeof(var) int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { int ch, newl, skip, i; char *p; @@ -198,7 +196,7 @@ main(argc, argv) } void -usage() +usage(void) { (void)fprintf(stderr, "usage: dmesg [-M core] [-N system]\n"); exit(1); diff --git a/sbin/fsck/fsck.c b/sbin/fsck/fsck.c index be53b0cfd17..01bc056a6a1 100644 --- a/sbin/fsck/fsck.c +++ b/sbin/fsck/fsck.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fsck.c,v 1.10 2002/06/09 08:13:05 todd Exp $ */ +/* $OpenBSD: fsck.c,v 1.11 2002/07/03 22:32:32 deraadt Exp $ */ /* $NetBSD: fsck.c,v 1.7 1996/10/03 20:06:30 christos Exp $ */ /* @@ -89,9 +89,7 @@ static void *isok(struct fstab *); int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { struct fstab *fs; int i, rval = 0; @@ -197,8 +195,7 @@ main(argc, argv) static void * -isok(fs) - struct fstab *fs; +isok(struct fstab *fs) { if (fs->fs_passno == 0) return NULL; @@ -214,10 +211,8 @@ isok(fs) static int -checkfs(vfstype, spec, mntpt, auxarg, pidp) - const char *vfstype, *spec, *mntpt; - void *auxarg; - pid_t *pidp; +checkfs(const char *vfstype, const char *spec, const char *mntpt, void *auxarg, + pid_t *pidp) { /* List of directories containing fsck_xxx subcommands. */ static const char *edirs[] = { @@ -328,8 +323,7 @@ checkfs(vfstype, spec, mntpt, auxarg, pidp) static int -selected(type) - const char *type; +selected(const char *type) { struct entry *e; @@ -343,8 +337,7 @@ selected(type) static const char * -getoptions(type) - const char *type; +getoptions(const char *type) { struct entry *e; @@ -356,8 +349,7 @@ getoptions(type) static void -addoption(optstr) - char *optstr; +addoption(char *optstr) { char *newoptions; struct entry *e; @@ -377,10 +369,7 @@ addoption(optstr) static void -addentry(list, type, opts) - struct fstypelist *list; - const char *type; - const char *opts; +addentry(struct fstypelist *list, const char *type, const char *opts) { struct entry *e; @@ -392,8 +381,7 @@ addentry(list, type, opts) static void -maketypelist(fslist) - char *fslist; +maketypelist(char *fslist) { char *ptr; @@ -414,10 +402,7 @@ maketypelist(fslist) static char * -catopt(s0, s1, fr) - char *s0; - const char *s1; - int fr; +catopt(char *s0, const char *s1, int fr) { size_t i; char *cp; @@ -437,11 +422,7 @@ catopt(s0, s1, fr) static void -mangle(opts, argcp, argvp, maxargcp) - char *opts; - int *argcp; - const char ***argvp; - int *maxargcp; +mangle(char *opts, int *argcp, const char ***argvp, int *maxargcp) { char *p, *s; int argc = *argcp, maxargc = *maxargcp; @@ -479,7 +460,7 @@ mangle(opts, argcp, argvp, maxargcp) static void -usage() +usage(void) { extern char *__progname; static const char common[] = diff --git a/sbin/fsck/fsutil.c b/sbin/fsck/fsutil.c index 8f99c527bd1..c666d7b6e77 100644 --- a/sbin/fsck/fsutil.c +++ b/sbin/fsck/fsutil.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fsutil.c,v 1.6 2002/02/19 19:39:38 millert Exp $ */ +/* $OpenBSD: fsutil.c,v 1.7 2002/07/03 22:32:32 deraadt Exp $ */ /* $NetBSD: fsutil.c,v 1.2 1996/10/03 20:06:31 christos Exp $ */ /* @@ -59,22 +59,20 @@ extern char *__progname; static void vmsg(int, const char *, va_list); void -setcdevname(cd, pr) - const char *cd; - int pr; +setcdevname(const char *cd, int pr) { dev = cd; preen = pr; } const char * -cdevname() +cdevname(void) { return dev; } int -hotroot() +hotroot(void) { return hot; } @@ -92,10 +90,7 @@ errexit(const char *fmt, ...) } static void -vmsg(fatal, fmt, ap) - int fatal; - const char *fmt; - va_list ap; +vmsg(int fatal, const char *fmt, va_list ap) { if (!fatal && preen) (void) printf("%s: ", dev); @@ -134,8 +129,7 @@ pwarn(const char *fmt, ...) } void -perror(s) - const char *s; +perror(const char *s) { pfatal("%s (%s)", s, strerror(errno)); } @@ -152,8 +146,7 @@ panic(const char *fmt, ...) } char * -unrawname(name) - char *name; +unrawname(char *name) { char *dp; struct stat stb; @@ -171,8 +164,7 @@ unrawname(name) } char * -rawname(name) - char *name; +rawname(char *name) { static char rawbuf[32]; char *dp; @@ -188,8 +180,7 @@ rawname(name) } char * -blockcheck(origname) - char *origname; +blockcheck(char *origname) { struct stat stslash, stblock, stchar; char *newname, *raw; @@ -242,8 +233,7 @@ retry: void * -emalloc(s) - size_t s; +emalloc(size_t s) { void *p; @@ -257,9 +247,7 @@ emalloc(s) void * -erealloc(p, s) - void *p; - size_t s; +erealloc(void *p, size_t s) { if (s == 0) err(1, "realloc failed"); @@ -271,8 +259,7 @@ erealloc(p, s) char * -estrdup(s) - const char *s; +estrdup(const char *s) { char *p = strdup(s); if (p == NULL) diff --git a/sbin/fsck/preen.c b/sbin/fsck/preen.c index c8c8dcebcff..ecaaf3c5099 100644 --- a/sbin/fsck/preen.c +++ b/sbin/fsck/preen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: preen.c,v 1.11 2002/06/09 08:13:05 todd Exp $ */ +/* $OpenBSD: preen.c,v 1.12 2002/07/03 22:32:32 deraadt Exp $ */ /* $NetBSD: preen.c,v 1.15 1996/09/28 19:21:42 christos Exp $ */ /* @@ -85,11 +85,8 @@ static int startdisk(struct diskentry *, static void printpart(void); int -checkfstab(flags, maxrun, docheck, checkit) - int flags, maxrun; - void *(*docheck)(struct fstab *); - int (*checkit)(const char *, const char *, const char *, void *, - pid_t *); +checkfstab(int flags, int maxrun, void *(*docheck)(struct fstab *), + int (*checkit)(const char *, const char *, const char *, void *, pid_t *)) { struct fstab *fs; struct diskentry *d, *nextdisk; @@ -249,8 +246,7 @@ checkfstab(flags, maxrun, docheck, checkit) static struct diskentry * -finddisk(name) - const char *name; +finddisk(const char *name) { const char *p; size_t len = 0; @@ -283,7 +279,7 @@ finddisk(name) static void -printpart() +printpart(void) { struct diskentry *d; struct partentry *p; @@ -299,9 +295,7 @@ printpart() static void -addpart(type, devname, mntpt, auxarg) - const char *type, *devname, *mntpt; - void *auxarg; +addpart(const char *type, const char *devname, const char *mntpt, void *auxarg) { struct diskentry *d = finddisk(devname); struct partentry *p; @@ -323,10 +317,8 @@ addpart(type, devname, mntpt, auxarg) static int -startdisk(d, checkit) - struct diskentry *d; - int (*checkit)(const char *, const char *, const char *, void *, - pid_t *); +startdisk(struct diskentry *d, + int (*checkit)(const char *, const char *, const char *, void *, pid_t *)) { struct partentry *p = d->d_part.tqh_first; int rv; diff --git a/sbin/fsirand/fsirand.c b/sbin/fsirand/fsirand.c index 25d8139f746..3c64b2fa4e9 100644 --- a/sbin/fsirand/fsirand.c +++ b/sbin/fsirand/fsirand.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fsirand.c,v 1.15 2002/06/09 08:13:06 todd Exp $ */ +/* $OpenBSD: fsirand.c,v 1.16 2002/07/03 22:32:32 deraadt Exp $ */ /* * Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com> @@ -28,7 +28,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: fsirand.c,v 1.15 2002/06/09 08:13:06 todd Exp $"; +static char rcsid[] = "$OpenBSD: fsirand.c,v 1.16 2002/07/03 22:32:32 deraadt Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -58,9 +58,7 @@ extern char *__progname; int printonly = 0, force = 0, ignorelabel = 0; int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { int n, ex = 0; struct rlimit rl; @@ -103,8 +101,7 @@ main(argc, argv) } int -fsirand(device) - char *device; +fsirand(char *device) { static struct dinode *inodebuf; static size_t oldibufsize; @@ -119,7 +116,7 @@ fsirand(device) struct disklabel label; if ((devfd = opendev(device, printonly ? O_RDONLY : O_RDWR, - OPENDEV_PART, &devpath)) < 0) { + OPENDEV_PART, &devpath)) < 0) { warn("Can't open %s", devpath); return (1); } @@ -203,7 +200,7 @@ fsirand(device) (void)printf("%s was randomized on %s", devpath, ctime((const time_t *)&(sblock->fs_id[0]))); (void)printf("fsid: %x %x\n", sblock->fs_id[0], - sblock->fs_id[1]); + sblock->fs_id[1]); } /* Randomize fs_id unless old 4.2BSD filesystem */ @@ -229,10 +226,12 @@ fsirand(device) /* Update superblock if appropriate */ if ((sblock->fs_inodefmt >= FS_44INODEFMT) && !printonly) { dblk = fsbtodb(sblock, cgsblock(sblock, cg)); - if (lseek(devfd, (off_t)dblk * (off_t)bsize, SEEK_SET) < 0) { + if (lseek(devfd, (off_t)dblk * (off_t)bsize, + SEEK_SET) < 0) { warn("Can't seek to %qd", (off_t)dblk * bsize); return (1); - } else if ((n = write(devfd, (void *)sblock, SBSIZE)) != SBSIZE) { + } else if ((n = write(devfd, (void *)sblock, SBSIZE)) != + SBSIZE) { warn("Can't read backup superblock %d on %s: %s", cg + 1, devpath, (n < SBSIZE) ? "short write" : strerror(errno)); @@ -247,7 +246,7 @@ fsirand(device) return (1); } else if ((n = read(devfd, inodebuf, ibufsize)) != ibufsize) { warnx("Can't read inodes: %s", - (n < ibufsize) ? "short read" : strerror(errno)); + (n < ibufsize) ? "short read" : strerror(errno)); return (1); } @@ -255,7 +254,7 @@ fsirand(device) if (inumber >= ROOTINO) { if (printonly) (void)printf("ino %d gen %x\n", inumber, - inodebuf[n].di_gen); + inodebuf[n].di_gen); else inodebuf[n].di_gen = arc4random(); } @@ -270,8 +269,8 @@ fsirand(device) } else if ((n = write(devfd, inodebuf, ibufsize)) != ibufsize) { warnx("Can't write inodes: %s", - (n != ibufsize) ? "short write" : - strerror(errno)); + (n != ibufsize) ? "short write" : + strerror(errno)); return (1); } } @@ -282,10 +281,9 @@ fsirand(device) } void -usage(ex) - int ex; +usage(int ex) { (void)fprintf(stderr, "Usage: %s [ -b ] [ -f ] [ -p ] special [special ...]\n", - __progname); + __progname); exit(ex); } diff --git a/sbin/init/init.c b/sbin/init/init.c index 0fc7cd144c2..9ae243e8f32 100644 --- a/sbin/init/init.c +++ b/sbin/init/init.c @@ -1,4 +1,4 @@ -/* $OpenBSD: init.c,v 1.27 2002/06/09 08:13:06 todd Exp $ */ +/* $OpenBSD: init.c,v 1.28 2002/07/03 22:32:32 deraadt Exp $ */ /* $NetBSD: init.c,v 1.22 1996/05/15 23:29:33 jtc Exp $ */ /*- @@ -47,7 +47,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)init.c 8.2 (Berkeley) 4/28/95"; #else -static char rcsid[] = "$OpenBSD: init.c,v 1.27 2002/06/09 08:13:06 todd Exp $"; +static char rcsid[] = "$OpenBSD: init.c,v 1.28 2002/07/03 22:32:32 deraadt Exp $"; #endif #endif /* not lint */ @@ -183,9 +183,7 @@ DB *session_db; * The mother of all processes. */ int -main(argc, argv) - int argc; - char **argv; +main(int argc, char *argv[]) { int c; struct sigaction sa; @@ -361,12 +359,12 @@ warning(char *message, ...) void emergency(char *message, ...) { + struct syslog_data sdata = SYSLOG_DATA_INIT; va_list ap; va_start(ap, message); - vsyslog(LOG_EMERG, message, ap); + vsyslog_r(LOG_EMERG, &sdata, message, ap); va_end(ap); - closelog(); } /* @@ -376,8 +374,7 @@ emergency(char *message, ...) * We tolerate up to 25 of these, then throw in the towel. */ void -badsys(sig) - int sig; +badsys(int sig) { static int badcount = 0; @@ -390,8 +387,7 @@ badsys(sig) * Catch an unexpected signal. */ void -disaster(sig) - int sig; +disaster(int sig) { emergency("fatal signal: %s", strsignal(sig)); @@ -403,7 +399,7 @@ disaster(sig) * Get the security level of the kernel. */ int -getsecuritylevel() +getsecuritylevel(void) { #ifdef KERN_SECURELVL int name[2], curlevel; @@ -427,8 +423,7 @@ getsecuritylevel() * Set the security level of the kernel. */ void -setsecuritylevel(newlevel) - int newlevel; +setsecuritylevel(int newlevel) { #ifdef KERN_SECURELVL int name[2], curlevel; @@ -457,8 +452,7 @@ setsecuritylevel(newlevel) * The initial state is passed as an argument. */ void -transition(s) - state_t s; +transition(state_t s) { for (;;) s = (state_t) (*s)(); @@ -469,8 +463,7 @@ transition(s) * NB: should send a message to the session logger to avoid blocking. */ void -clear_session_logs(sp) - session_t *sp; +clear_session_logs(session_t *sp) { char *line = sp->se_device + sizeof(_PATH_DEV) - 1; @@ -483,13 +476,12 @@ clear_session_logs(sp) * Only called by children of init after forking. */ void -setctty(name) - char *name; +setctty(char *name) { int fd; (void) revoke(name); - sleep (2); /* leave DTR low */ + sleep(2); /* leave DTR low */ if ((fd = open(name, O_RDWR)) == -1) { stall("can't open %s: %m", name); _exit(1); @@ -504,7 +496,7 @@ setctty(name) * Bring the system up single user. */ state_func_t -single_user() +single_user(void) { pid_t pid, wpid; int status; @@ -673,7 +665,7 @@ single_user() * Run the system startup script. */ state_func_t -runcom() +runcom(void) { pid_t pid, wpid; int status; @@ -765,7 +757,7 @@ runcom() * NB: We could pass in the size here; is it necessary? */ int -start_session_db() +start_session_db(void) { if (session_db && (*session_db->close)(session_db)) emergency("session database close: %s", strerror(errno)); @@ -774,15 +766,13 @@ start_session_db() return (1); } return (0); - } /* * Add a new login session. */ void -add_session(sp) - session_t *sp; +add_session(session_t *sp) { DBT key; DBT data; @@ -800,8 +790,7 @@ add_session(sp) * Delete an old login session. */ void -del_session(sp) - session_t *sp; +del_session(session_t *sp) { DBT key; @@ -834,8 +823,7 @@ find_session(pid_t pid) * Construct an argument vector from a command line. */ char ** -construct_argv(command) - char *command; +construct_argv(char *command) { int argc = 0; char **argv = (char **) malloc(((strlen(command) + 1) / 2 + 1) @@ -853,8 +841,7 @@ construct_argv(command) * Deallocate a session descriptor. */ void -free_session(sp) - session_t *sp; +free_session(session_t *sp) { free(sp->se_device); if (sp->se_getty) { @@ -872,10 +859,7 @@ free_session(sp) * Allocate a new session descriptor. */ session_t * -new_session(sprev, session_index, typ) - session_t *sprev; - int session_index; - struct ttyent *typ; +new_session(session_t *sprev, int session_index, struct ttyent *typ) { session_t *sp; @@ -914,9 +898,7 @@ new_session(sprev, session_index, typ) * Calculate getty and if useful window argv vectors. */ int -setupargv(sp, typ) - session_t *sp; - struct ttyent *typ; +setupargv(session_t *sp, struct ttyent *typ) { if (sp->se_getty) { @@ -952,7 +934,7 @@ setupargv(sp, typ) * Walk the list of ttys and create sessions for each active line. */ state_func_t -read_ttys() +read_ttys(void) { int session_index = 0; session_t *sp, *snext; @@ -989,8 +971,7 @@ read_ttys() * Start a window system running. */ void -start_window_system(sp) - session_t *sp; +start_window_system(session_t *sp) { pid_t pid; sigset_t mask; @@ -1026,8 +1007,7 @@ start_window_system(sp) * that do not exist. */ pid_t -start_getty(sp) - session_t *sp; +start_getty(session_t *sp) { pid_t pid; sigset_t mask; @@ -1153,8 +1133,7 @@ collect_child(pid_t pid) * Catch a signal and request a state transition. */ void -transition_handler(sig) - int sig; +transition_handler(int sig) { switch (sig) { @@ -1180,7 +1159,7 @@ transition_handler(sig) * Take the system multiuser. */ state_func_t -multi_user() +multi_user(void) { pid_t pid; session_t *sp; @@ -1220,7 +1199,7 @@ multi_user() * This is an n-squared algorithm. We hope it isn't run often... */ state_func_t -clean_ttys() +clean_ttys(void) { session_t *sp, *sprev; struct ttyent *typ; @@ -1280,7 +1259,7 @@ clean_ttys() * Block further logins. */ state_func_t -catatonia() +catatonia(void) { session_t *sp; @@ -1294,8 +1273,7 @@ catatonia() * Note SIGALRM. */ void -alrm_handler(sig) - int sig; +alrm_handler(int sig) { clang = 1; } @@ -1304,7 +1282,7 @@ alrm_handler(sig) * Bring the system down to single user nicely, after run the shutdown script. */ state_func_t -nice_death() +nice_death(void) { session_t *sp; int i; @@ -1382,7 +1360,7 @@ die: * Bring the system down to single user. */ state_func_t -death() +death(void) { session_t *sp; int i; @@ -1417,8 +1395,7 @@ death() #ifdef LOGIN_CAP void -setprocresources(class) - char *class; +setprocresources(char *class) { login_cap_t *lc; diff --git a/sbin/iopctl/iopctl.c b/sbin/iopctl/iopctl.c index 8ca66fe4750..8907b39000e 100644 --- a/sbin/iopctl/iopctl.c +++ b/sbin/iopctl/iopctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: iopctl.c,v 1.2 2002/06/09 08:13:06 todd Exp $ */ +/* $OpenBSD: iopctl.c,v 1.3 2002/07/03 22:32:33 deraadt Exp $ */ /* $NetBSD: iopctl.c,v 1.8 2001/03/20 13:07:51 ad Exp $ */ /*- @@ -107,7 +107,7 @@ char buf[32768]; struct i2o_status status; int -main(int argc, char **argv) +main(int argc, char *argv[]) { int ch, i; const char *dv; diff --git a/sbin/ipsecadm/ipsecadm.c b/sbin/ipsecadm/ipsecadm.c index 74f9acdd64c..a19735a4d2f 100644 --- a/sbin/ipsecadm/ipsecadm.c +++ b/sbin/ipsecadm/ipsecadm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ipsecadm.c,v 1.63 2001/12/01 19:05:01 deraadt Exp $ */ +/* $OpenBSD: ipsecadm.c,v 1.64 2002/07/03 22:32:33 deraadt Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), * Angelos D. Keromytis (kermit@csd.uch.gr) and @@ -260,7 +260,7 @@ gotit: } void -usage() +usage(void) { fprintf(stderr, "usage: ipsecadm [command] <modifier...>\n" "\tCommands: new esp, old esp, new ah, old ah, group, delspi, ip4, ipcomp,\n" @@ -305,7 +305,7 @@ usage() } int -main(int argc, char **argv) +main(int argc, char *argv[]) { int auth = 0, enc = 0, klen = 0, alen = 0, mode = ESP_NEW, i = 0; int proto = IPPROTO_ESP, proto2 = IPPROTO_AH, sproto2 = SADB_SATYPE_AH; diff --git a/sbin/kbd/kbd_sparc.c b/sbin/kbd/kbd_sparc.c index 2ca19e12409..3dce5366567 100644 --- a/sbin/kbd/kbd_sparc.c +++ b/sbin/kbd/kbd_sparc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kbd_sparc.c,v 1.6 2002/06/09 08:13:07 todd Exp $ */ +/* $OpenBSD: kbd_sparc.c,v 1.7 2002/07/03 22:32:33 deraadt Exp $ */ /* * Copyright (c) 1999 Mats O Jansson. All rights reserved. @@ -150,7 +150,7 @@ struct { extern char *__progname; char * -kbd_find_default() +kbd_find_default(void) { int i, j, fd, r, ok; int t = KB_SUN4; @@ -184,7 +184,7 @@ kbd_find_default() } void -kbd_list() +kbd_list(void) { int i, j; char *defmap; @@ -203,9 +203,7 @@ kbd_list() } void -kbd_set(name, verbose) - char *name; - int verbose; +kbd_set(char *name, int verbose) { int i, j, fd, r; keymap_t *map = NULL; diff --git a/sbin/kbd/kbd_wscons.c b/sbin/kbd/kbd_wscons.c index bcde7e7e846..dc88f905748 100644 --- a/sbin/kbd/kbd_wscons.c +++ b/sbin/kbd/kbd_wscons.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kbd_wscons.c,v 1.8 2002/05/29 20:45:58 maja Exp $ */ +/* $OpenBSD: kbd_wscons.c,v 1.9 2002/07/03 22:32:33 deraadt Exp $ */ /* * Copyright (c) 2001 Mats O Jansson. All rights reserved. @@ -94,9 +94,7 @@ int rebuild = 0; #ifndef NOKVM void -kbd_show_enc(kd, idx) - kvm_t *kd; - int idx; +kbd_show_enc(kvm_t *kd, int idx) { struct wscons_keydesc r; unsigned long p; @@ -145,7 +143,7 @@ kbd_show_enc(kd, idx) #endif void -kbd_list() +kbd_list(void) { int fd, i, kbtype, ret; kvm_t *kd; @@ -220,9 +218,7 @@ kbd_list() } void -kbd_set(name, verbose) - char *name; - int verbose; +kbd_set(char *name, int verbose) { char buf[_POSIX2_LINE_MAX]; char *c,*b; diff --git a/sbin/kbd/main.c b/sbin/kbd/main.c index 85a0f946fcf..9e6982a10b3 100644 --- a/sbin/kbd/main.c +++ b/sbin/kbd/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.4 2002/02/16 21:27:35 millert Exp $ */ +/* $OpenBSD: main.c,v 1.5 2002/07/03 22:32:33 deraadt Exp $ */ /* * Copyright (c) 1996 Juergen Hannken-Illjes @@ -41,7 +41,7 @@ extern void kbd_set(char *, int); extern char *__progname; static void -usage() +usage(void) { fprintf(stderr, "usage: %s -l or %s [-q] name\n", __progname, __progname); @@ -49,9 +49,7 @@ usage() } int -main(argc, argv) - int argc; - char **argv; +main(int argc, char *argv[]) { char *optstring = "lq"; int ch, list_tables, verbose; diff --git a/sbin/mknod/mknod.c b/sbin/mknod/mknod.c index 36048ab6d41..230afd0c9cd 100644 --- a/sbin/mknod/mknod.c +++ b/sbin/mknod/mknod.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mknod.c,v 1.11 2002/06/09 08:13:07 todd Exp $ */ +/* $OpenBSD: mknod.c,v 1.12 2002/07/03 22:32:33 deraadt Exp $ */ /* $NetBSD: mknod.c,v 1.8 1995/08/11 00:08:18 jtc Exp $ */ /* @@ -47,7 +47,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)mknod.c 8.1 (Berkeley) 6/5/93"; #else -static char rcsid[] = "$OpenBSD: mknod.c,v 1.11 2002/06/09 08:13:07 todd Exp $"; +static char rcsid[] = "$OpenBSD: mknod.c,v 1.12 2002/07/03 22:32:33 deraadt Exp $"; #endif #endif /* not lint */ @@ -67,9 +67,7 @@ int domkfifo(int, char **, mode_t); void usage(int); int -main(argc, argv) - int argc; - char **argv; +main(int argc, char *argv[]) { int ch, ismkfifo = 0; void *set = NULL; @@ -135,10 +133,7 @@ main(argc, argv) } int -domknod(argc, argv, mode) - int argc; - char **argv; - mode_t mode; +domknod(int argc, char **argv, mode_t mode) { dev_t dev; char *endp; @@ -176,10 +171,7 @@ domknod(argc, argv, mode) } int -domkfifo(argc, argv, mode) - int argc; - char **argv; - mode_t mode; +domkfifo(int argc, char **argv, mode_t mode) { int rv; @@ -193,8 +185,7 @@ domkfifo(argc, argv, mode) } void -usage(ismkfifo) - int ismkfifo; +usage(int ismkfifo) { if (ismkfifo == 1) diff --git a/sbin/mount/mount.c b/sbin/mount/mount.c index ae718799552..a28dd8e432f 100644 --- a/sbin/mount/mount.c +++ b/sbin/mount/mount.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mount.c,v 1.27 2002/06/09 08:13:07 todd Exp $ */ +/* $OpenBSD: mount.c,v 1.28 2002/07/03 22:32:33 deraadt Exp $ */ /* $NetBSD: mount.c,v 1.24 1995/11/18 03:34:29 cgd Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)mount.c 8.19 (Berkeley) 4/19/94"; #else -static char rcsid[] = "$OpenBSD: mount.c,v 1.27 2002/06/09 08:13:07 todd Exp $"; +static char rcsid[] = "$OpenBSD: mount.c,v 1.28 2002/07/03 22:32:33 deraadt Exp $"; #endif #endif /* not lint */ @@ -116,9 +116,7 @@ static struct opt { }; int -main(argc, argv) - int argc; - char * const argv[]; +main(int argc, char * const argv[]) { const char *mntonname, *vfstype; struct fstab *fs; @@ -277,8 +275,7 @@ main(argc, argv) } int -hasopt(mntopts, option) - const char *mntopts, *option; +hasopt(const char *mntopts, const char *option) { int negative, found; char *opt, *optbuf; @@ -302,9 +299,8 @@ hasopt(mntopts, option) } int -mountfs(vfstype, spec, name, flags, options, mntopts, skipmounted) - const char *vfstype, *spec, *name, *options, *mntopts; - int flags, skipmounted; +mountfs(const char *vfstype, const char *spec, const char *name, int flags, + const char *options, const char *mntopts, int skipmounted) { /* List of directories containing mount_xxx subcommands. */ static const char *edirs[] = { @@ -437,8 +433,7 @@ mountfs(vfstype, spec, name, flags, options, mntopts, skipmounted) } void -prmount(sf) - struct statfs *sf; +prmount(struct statfs *sf) { int flags; struct opt *o; @@ -564,8 +559,7 @@ prmount(sf) } struct statfs * -getmntpt(name) - const char *name; +getmntpt(const char *name) { struct statfs *mntbuf; int i, mntsize; @@ -581,8 +575,7 @@ getmntpt(name) static enum { IN_LIST, NOT_IN_LIST } which; int -selected(type) - const char *type; +selected(const char *type) { char **av; @@ -596,8 +589,7 @@ selected(type) } void -maketypelist(fslist) - char *fslist; +maketypelist(char *fslist) { int i; char *nextcp, **av; @@ -633,9 +625,7 @@ maketypelist(fslist) } char * -catopt(s0, s1) - char *s0; - const char *s1; +catopt(char *s0, const char *s1) { size_t i; char *cp; @@ -654,10 +644,7 @@ catopt(s0, s1) } void -mangle(options, argcp, argv) - char *options; - int *argcp; - const char **argv; +mangle(char *options, int *argcp, const char **argv) { char *p, *s; int argc; @@ -682,21 +669,20 @@ mangle(options, argcp, argv) } void -usage() +usage(void) { (void)fprintf(stderr, - "usage: mount %s %s\n mount %s\n mount %s\n", - "[-dfruvw] [-o options] [-t ffs | external_type]", - "special node", - "[-adfruvw] [-t ffs | external_type]", - "[-dfruvw] special | node"); + "usage: mount %s %s\n mount %s\n mount %s\n", + "[-dfruvw] [-o options] [-t ffs | external_type]", + "special node", + "[-adfruvw] [-t ffs | external_type]", + "[-dfruvw] special | node"); exit(1); } int -disklabelcheck(fs) - struct fstab *fs; +disklabelcheck(struct fstab *fs) { char *labelfs; diff --git a/sbin/ncheck_ffs/ncheck_ffs.c b/sbin/ncheck_ffs/ncheck_ffs.c index a6a236b4a74..f814ce68d0e 100644 --- a/sbin/ncheck_ffs/ncheck_ffs.c +++ b/sbin/ncheck_ffs/ncheck_ffs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ncheck_ffs.c,v 1.11 2002/05/22 08:21:02 deraadt Exp $ */ +/* $OpenBSD: ncheck_ffs.c,v 1.12 2002/07/03 22:32:33 deraadt Exp $ */ /*- * Copyright (c) 1995, 1996 SigmaSoft, Th. Lockert <tholo@sigmasoft.com> @@ -31,7 +31,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: ncheck_ffs.c,v 1.11 2002/05/22 08:21:02 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: ncheck_ffs.c,v 1.12 2002/07/03 22:32:33 deraadt Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -91,8 +91,7 @@ char *rawname(char *); * Check to see if the indicated inodes are the same */ int -matchino(key, val) - const void *key, *val; +matchino(const void *key, const void *val) { ino_t k = *(ino_t *)key; ino_t v = *(ino_t *)val; @@ -107,8 +106,7 @@ matchino(key, val) /* * Check if the indicated inode match the entry in the cache */ -int matchcache(key, val) - const void *key, *val; +int matchcache(const void *key, const void *val) { ino_t ino = *(ino_t *)key; struct icache_s *ic = (struct icache_s *)val; @@ -124,9 +122,7 @@ int matchcache(key, val) * Add an inode to the cached entries */ void -cacheino(ino, ip) - ino_t ino; - struct dinode *ip; +cacheino(ino_t ino, struct dinode *ip) { if (nicache) icache = realloc(icache, (nicache + 1) * sizeof(struct icache_s)); @@ -140,12 +136,12 @@ cacheino(ino, ip) * Get a cached inode */ struct dinode * -cached(ino) - ino_t ino; +cached(ino_t ino) { struct icache_s *ic; - ic = (struct icache_s *)bsearch(&ino, icache, nicache, sizeof(struct icache_s), matchcache); + ic = (struct icache_s *)bsearch(&ino, icache, nicache, + sizeof(struct icache_s), matchcache); return ic ? &ic->di : NULL; } @@ -155,8 +151,7 @@ cached(ino) * inodes pointing to directories */ void -findinodes(maxino) - ino_t maxino; +findinodes(ino_t maxino) { ino_t ino; struct dinode *dp; @@ -183,8 +178,7 @@ findinodes(maxino) * per cylinder group */ struct dinode * -getino(inum) - ino_t inum; +getino(ino_t inum) { static struct dinode *itab = NULL; static daddr_t iblk = -1; @@ -214,10 +208,7 @@ int breaderrors = 0; #define BREADEMAX 32 void -bread(blkno, buf, size) - daddr_t blkno; - char *buf; - int size; +bread(daddr_t blkno, char *buf, int size) { int cnt, i; @@ -271,8 +262,7 @@ loop: * Add an inode to the in-memory list of inodes to dump */ void -addinode(ino) - ino_t ino; +addinode(ino_t ino) { if (ninodes) ilist = realloc(ilist, sizeof(ino_t) * (ninodes + 1)); @@ -288,9 +278,7 @@ addinode(ino) * Scan the directory pointer at by ino */ void -scanonedir(ino, path) - ino_t ino; - const char *path; +scanonedir(ino_t ino, const char *path) { struct dinode *dp; long filesize; @@ -317,12 +305,8 @@ scanonedir(ino, path) * require the directory to be dumped. */ void -dirindir(ino, blkno, ind_level, filesize, path) - ino_t ino; - daddr_t blkno; - int ind_level; - long *filesize; - const char *path; +dirindir(ino_t ino, daddr_t blkno, int ind_level, long *filesize, + const char *path) { daddr_t idblk[MAXBSIZE / sizeof(daddr_t)]; int i; @@ -352,12 +336,8 @@ dirindir(ino, blkno, ind_level, filesize, path) * Pass inodes pointing to directories back to scanonedir(). */ void -searchdir(ino, blkno, size, filesize, path) - ino_t ino; - daddr_t blkno; - long size; - long filesize; - const char *path; +searchdir(ino_t ino, daddr_t blkno, long size, long filesize, + const char *path) { char dblk[MAXBSIZE]; struct direct *dp; @@ -411,8 +391,7 @@ searchdir(ino, blkno, size, filesize, path) } char * -rawname(name) - char *name; +rawname(char *name) { static char newname[MAXPATHLEN]; char *p; @@ -428,16 +407,14 @@ rawname(name) } void -usage() +usage(void) { fprintf(stderr, "Usage: ncheck_ffs [-i numbers] [-ams] filesystem\n"); exit(3); } int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { struct stat stblock; struct fstab *fsp; diff --git a/sbin/nfsd/nfsd.c b/sbin/nfsd/nfsd.c index 29408ac2ecd..ac8ddf18028 100644 --- a/sbin/nfsd/nfsd.c +++ b/sbin/nfsd/nfsd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfsd.c,v 1.18 2002/06/11 15:45:44 hin Exp $ */ +/* $OpenBSD: nfsd.c,v 1.19 2002/07/03 22:32:33 deraadt Exp $ */ /* $NetBSD: nfsd.c,v 1.19 1996/02/18 23:18:56 mycroft Exp $ */ /* @@ -118,9 +118,7 @@ void usage(void); * followed by "n" which is the number of nfsds' to fork off */ int -main(argc, argv, envp) - int argc; - char *argv[], *envp[]; +main(int argc, char *argv[]) { struct nfsd_args nfsdargs; struct sockaddr_in inetaddr, inetpeer; @@ -505,23 +503,24 @@ main(argc, argv, envp) } void -usage() +usage(void) { (void)fprintf(stderr, "usage: nfsd %s\n", USAGE); exit(1); } void -nonfs(signo) - int signo; +nonfs(int signo) { - /* XXX signal race */ - syslog(LOG_ERR, "missing system call: NFS not available."); + int save_errno = errno; + struct syslog_data sdata = SYSLOG_DATA_INIT; + + syslog_r(LOG_ERR, &sdata, "missing system call: NFS not available."); + errno = save_errno; } void -reapchild(signo) - int signo; +reapchild(int signo) { int save_errno = errno; diff --git a/sbin/nologin/nologin.c b/sbin/nologin/nologin.c index c4132b53424..4ce50db003d 100644 --- a/sbin/nologin/nologin.c +++ b/sbin/nologin/nologin.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nologin.c,v 1.2 1997/04/04 16:51:37 millert Exp $ */ +/* $OpenBSD: nologin.c,v 1.3 2002/07/03 22:32:33 deraadt Exp $ */ /* * Copyright (c) 1997, Jason Downs. All rights reserved. @@ -36,9 +36,7 @@ #define DEFAULT_MESG "This account is currently not available.\n" /*ARGSUSED*/ -int main(argc, argv) - int argc; - char *argv[]; +int main(int argc, char *argv[]) { int nfd, nrd; char nbuf[128]; diff --git a/sbin/quotacheck/quotacheck.c b/sbin/quotacheck/quotacheck.c index 577d17a801f..f7394031e21 100644 --- a/sbin/quotacheck/quotacheck.c +++ b/sbin/quotacheck/quotacheck.c @@ -1,4 +1,4 @@ -/* $OpenBSD: quotacheck.c,v 1.13 2002/02/17 19:42:29 millert Exp $ */ +/* $OpenBSD: quotacheck.c,v 1.14 2002/07/03 22:32:33 deraadt Exp $ */ /* $NetBSD: quotacheck.c,v 1.12 1996/03/30 22:34:25 mark Exp $ */ /* @@ -47,7 +47,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)quotacheck.c 8.3 (Berkeley) 1/29/94"; #else -static char rcsid[] = "$OpenBSD: quotacheck.c,v 1.13 2002/02/17 19:42:29 millert Exp $"; +static char rcsid[] = "$OpenBSD: quotacheck.c,v 1.14 2002/07/03 22:32:33 deraadt Exp $"; #endif #endif /* not lint */ @@ -130,9 +130,7 @@ int update(const char *, const char *, int); void usage(void); int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { struct fstab *fs; struct passwd *pw; @@ -212,7 +210,7 @@ main(argc, argv) } void -usage() +usage(void) { (void)fprintf(stderr, "usage:\t%s\n\t%s\n", "quotacheck -a [-dguv] [-l <maxparallel>]", @@ -221,8 +219,7 @@ usage() } void * -needchk(fs) - struct fstab *fs; +needchk(struct fstab *fs) { struct quotaname *qnp; char *qfnp; @@ -258,10 +255,8 @@ needchk(fs) * Scan the specified filesystem to check quota(s) present on it. */ int -chkquota(vfstype, fsname, mntpt, auxarg, pidp) - const char *vfstype, *fsname, *mntpt; - void *auxarg; - pid_t *pidp; +chkquota(const char *vfstype, const char *fsname, const char *mntpt, + void *auxarg, pid_t *pidp) { struct quotaname *qnp = auxarg; struct fileusage *fup; @@ -356,9 +351,7 @@ chkquota(vfstype, fsname, mntpt, auxarg, pidp) * Update a specified quota file. */ int -update(fsname, quotafile, type) - const char *fsname, *quotafile; - int type; +update(const char *fsname, const char *quotafile, int type) { struct fileusage *fup; FILE *qfi, *qfo; @@ -455,9 +448,7 @@ update(fsname, quotafile, type) * Check to see if target appears in list of size cnt. */ int -oneof(target, list, cnt) - char *target, *list[]; - int cnt; +oneof(char *target, char *list[], int cnt) { int i; @@ -471,7 +462,7 @@ oneof(target, list, cnt) * Determine the group identifier for quota files. */ int -getquotagid() +getquotagid(void) { struct group *gr; @@ -484,10 +475,7 @@ getquotagid() * Check to see if a particular quota is to be enabled. */ int -hasquota(fs, type, qfnamep) - struct fstab *fs; - int type; - char **qfnamep; +hasquota(struct fstab *fs, int type, char **qfnamep) { char *opt; char *cp; @@ -528,9 +516,7 @@ hasquota(fs, type, qfnamep) * Lookup an id of a specific type. */ struct fileusage * -lookup(id, type) - u_long id; - int type; +lookup(u_long id, int type) { struct fileusage *fup; @@ -544,10 +530,7 @@ lookup(id, type) * Add a new file usage id if it does not already exist. */ struct fileusage * -addid(id, type, name) - u_long id; - int type; - char *name; +addid(u_long id, int type, char *name) { struct fileusage *fup, **fhp; int len; @@ -583,8 +566,7 @@ struct dinode *inodebuf; #define INOBUFSIZE 56*1024 /* size of buffer to read inodes */ struct dinode * -getnextinode(inumber) - ino_t inumber; +getnextinode(ino_t inumber) { long size; daddr_t dblk; @@ -612,7 +594,7 @@ getnextinode(inumber) * Prepare to scan a set of inodes. */ void -resetinodebuf() +resetinodebuf(void) { nextino = 0; @@ -640,7 +622,7 @@ resetinodebuf() * Free up data structures used to scan inodes. */ void -freeinodebuf() +freeinodebuf(void) { if (inodebuf != NULL) @@ -652,10 +634,7 @@ freeinodebuf() * Read specified disk blocks. */ void -bread(bno, buf, cnt) - daddr_t bno; - char *buf; - long cnt; +bread(daddr_t bno, char *buf, long cnt) { if (lseek(fi, (off_t)bno * dev_bsize, SEEK_SET) < 0 || diff --git a/sbin/reboot/reboot.c b/sbin/reboot/reboot.c index 5ef0cbc3c73..ab8762e53ba 100644 --- a/sbin/reboot/reboot.c +++ b/sbin/reboot/reboot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: reboot.c,v 1.23 2002/02/16 21:27:37 millert Exp $ */ +/* $OpenBSD: reboot.c,v 1.24 2002/07/03 22:32:33 deraadt Exp $ */ /* $NetBSD: reboot.c,v 1.8 1995/10/05 05:36:22 mycroft Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)reboot.c 8.1 (Berkeley) 6/5/93"; #else -static char rcsid[] = "$OpenBSD: reboot.c,v 1.23 2002/02/16 21:27:37 millert Exp $"; +static char rcsid[] = "$OpenBSD: reboot.c,v 1.24 2002/07/03 22:32:33 deraadt Exp $"; #endif #endif /* not lint */ @@ -72,9 +72,7 @@ extern char *__progname; #define _PATH_RC "/etc/rc" int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { int i; struct passwd *pw; @@ -250,7 +248,7 @@ restart: } void -usage() +usage(void) { (void)fprintf(stderr, "usage: %s [-dlnpq]\n", __progname); exit(1); diff --git a/sbin/savecore/savecore.c b/sbin/savecore/savecore.c index 89d009a2f9f..7e97d81e889 100644 --- a/sbin/savecore/savecore.c +++ b/sbin/savecore/savecore.c @@ -1,4 +1,4 @@ -/* $OpenBSD: savecore.c,v 1.30 2002/05/22 20:09:36 deraadt Exp $ */ +/* $OpenBSD: savecore.c,v 1.31 2002/07/03 22:32:33 deraadt Exp $ */ /* $NetBSD: savecore.c,v 1.26 1996/03/18 21:16:05 leo Exp $ */ /*- @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)savecore.c 8.3 (Berkeley) 1/2/94"; #else -static char rcsid[] = "$OpenBSD: savecore.c,v 1.30 2002/05/22 20:09:36 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: savecore.c,v 1.31 2002/07/03 22:32:33 deraadt Exp $"; #endif #endif /* not lint */ @@ -138,12 +138,10 @@ int Open(char *, int rw); char *rawname(char *s); void save_core(void); void usage(void); -void Write(int, void *, int); +void Write(int, void *, size_t); int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { struct rlimit rl; int ch; @@ -220,7 +218,7 @@ main(argc, argv) char *dump_sys; void -kmem_setup() +kmem_setup(void) { kvm_t *kd_kern; char errbuf[_POSIX2_LINE_MAX]; @@ -305,7 +303,7 @@ kmem_setup() } void -check_kmem() +check_kmem(void) { char *cp; int panicloc; @@ -355,7 +353,7 @@ check_kmem() } int -dump_exists() +dump_exists(void) { int newdumpmag; @@ -381,7 +379,7 @@ dump_exists() } void -clear_dump() +clear_dump(void) { if (kvm_dump_inval(kd_dump) == -1) syslog(LOG_ERR, "%s: kvm_clear_dump: %s", ddname, @@ -392,7 +390,7 @@ clear_dump() char buf[1024 * 1024]; void -save_core() +save_core(void) { FILE *fp; int bounds, ifd, nr, nw, ofd = -1; @@ -525,9 +523,7 @@ err2: syslog(LOG_WARNING, } char * -find_dev(dev, type) - dev_t dev; - int type; +find_dev(dev_t dev, int type) { DIR *dfd; struct dirent *dir; @@ -563,8 +559,7 @@ find_dev(dev, type) } char * -rawname(s) - char *s; +rawname(char *s) { char *sl, name[MAXPATHLEN]; @@ -582,7 +577,7 @@ rawname(s) } int -get_crashtime() +get_crashtime(void) { time_t dumptime; /* Time the dump was taken. */ @@ -602,7 +597,7 @@ get_crashtime() } int -check_space() +check_space(void) { FILE *fp; char *tkernel; @@ -647,9 +642,7 @@ check_space() } int -Open(name, rw) - char *name; - int rw; +Open(char *name, int rw) { int fd; @@ -661,9 +654,7 @@ Open(name, rw) } void -Lseek(fd, off, flag) - int fd, flag; - off_t off; +Lseek(int fd, off_t off, int flag) { off_t ret; @@ -675,9 +666,7 @@ Lseek(fd, off, flag) } int -Create(file, mode) - char *file; - int mode; +Create(char *file, int mode) { int fd; @@ -690,9 +679,7 @@ Create(file, mode) } void -Write(fd, bp, size) - int fd, size; - void *bp; +Write(int fd, void *bp, size_t size) { int n; @@ -703,7 +690,7 @@ Write(fd, bp, size) } void -usage() +usage(void) { extern char *__progname; fprintf(stderr, "usage: %s [-cfvz] [-N system] directory\n", diff --git a/sbin/scan_ffs/scan_ffs.c b/sbin/scan_ffs/scan_ffs.c index b74cdde88b9..b1219986e84 100644 --- a/sbin/scan_ffs/scan_ffs.c +++ b/sbin/scan_ffs/scan_ffs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scan_ffs.c,v 1.7 2001/07/07 18:26:21 deraadt Exp $ */ +/* $OpenBSD: scan_ffs.c,v 1.8 2002/07/03 22:32:33 deraadt Exp $ */ /* * Copyright (c) 1998 Niklas Hallqvist, Tobias Weingartner @@ -50,10 +50,7 @@ #define FLAG_LABELS 4 int -ufsscan(fd, beg, end, flags) - int fd; - daddr_t beg, end; - int flags; +ufsscan(int fd, daddr_t beg, daddr_t end, int flags) { static char lastmount[MAXMNTLEN]; static u_int8_t buf[SBSIZE * SBCOUNT]; @@ -64,14 +61,14 @@ ufsscan(fd, beg, end, flags) lastblk = -1; memset(lastmount, 0, MAXMNTLEN); - for(blk = beg; blk <= ((end<0)?blk:end); blk += (SBCOUNT*SBSIZE/512)){ + for (blk = beg; blk <= ((end<0)?blk:end); blk += (SBCOUNT*SBSIZE/512)){ memset(buf, 0, SBSIZE * SBCOUNT); if (lseek(fd, (off_t)blk * 512, SEEK_SET) < 0) err(1, "lseek"); if (read(fd, buf, SBSIZE * SBCOUNT) < 0) err(1, "read"); - for(n = 0; n < (SBSIZE * SBCOUNT); n += 512){ + for (n = 0; n < (SBSIZE * SBCOUNT); n += 512){ sb = (struct fs*)(&buf[n]); if (sb->fs_magic == FS_MAGIC) { if (flags & FLAG_VERBOSE) @@ -82,19 +79,23 @@ ufsscan(fd, beg, end, flags) if (((blk+(n/512)) - lastblk) == (SBSIZE/512)) { if (flags & FLAG_LABELS ) { printf("X: %d %d 4.2BSD %d %d %d # %s\n", - (daddr_t)((off_t)sb->fs_size * sb->fs_fsize / 512), + (daddr_t)((off_t)sb->fs_size * + sb->fs_fsize / 512), blk+(n/512)-(2*SBSIZE/512), sb->fs_fsize, sb->fs_bsize, sb->fs_cpg, lastmount); } else { - printf("ffs at %d size %lld mount %s time %s", + printf("ffs at %d size %lld " + "mount %s time %s", blk+(n/512)-(2*SBSIZE/512), - (long long)(off_t)sb->fs_size * sb->fs_fsize, + (long long)(off_t)sb->fs_size * + sb->fs_fsize, lastmount, ctime(&sb->fs_time)); } if (flags & FLAG_SMART) { - off_t size = (off_t)sb->fs_size * sb->fs_fsize; + off_t size = (off_t)sb->fs_size * + sb->fs_fsize; if ((n + size) < (SBSIZE * SBCOUNT)) n += size; @@ -117,19 +118,18 @@ ufsscan(fd, beg, end, flags) void -usage(code) - int code; +usage(int code) { extern char *__progname; - (void)fprintf(stderr, "usage: %s [-lsv] [-b begin] [-e end] device\n", __progname); + + fprintf(stderr, "usage: %s [-lsv] [-b begin] [-e end] device\n", + __progname); exit(code); } int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { int ch, fd, flags = 0; daddr_t beg = 0, end = -1; diff --git a/sbin/shutdown/shutdown.c b/sbin/shutdown/shutdown.c index 71a01c6f3f4..f5a15702ec8 100644 --- a/sbin/shutdown/shutdown.c +++ b/sbin/shutdown/shutdown.c @@ -1,4 +1,4 @@ -/* $OpenBSD: shutdown.c,v 1.25 2002/05/26 09:24:35 deraadt Exp $ */ +/* $OpenBSD: shutdown.c,v 1.26 2002/07/03 22:32:33 deraadt Exp $ */ /* $NetBSD: shutdown.c,v 1.9 1995/03/18 15:01:09 cgd Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)shutdown.c 8.2 (Berkeley) 2/16/94"; #else -static char rcsid[] = "$OpenBSD: shutdown.c,v 1.25 2002/05/26 09:24:35 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: shutdown.c,v 1.26 2002/07/03 22:32:33 deraadt Exp $"; #endif #endif /* not lint */ @@ -118,9 +118,7 @@ void timewarn(int); void usage(void); int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { char *p, *endp; struct passwd *pw; @@ -247,7 +245,7 @@ main(argc, argv) } void -loop() +loop(void) { struct interval *tp; u_int sltime; @@ -296,8 +294,7 @@ static char *restricted_environ[] = { }; void -timewarn(timeleft) - int timeleft; +timewarn(int timeleft) { static int first; static char hostname[MAXHOSTNAMELEN]; @@ -348,14 +345,13 @@ timewarn(timeleft) } void -timeout(signo) - int signo; +timeout(int signo) { longjmp(alarmbuf, 1); /* XXX signal/longjmp resource leaks */ } void -die_you_gravy_sucking_pig_dog() +die_you_gravy_sucking_pig_dog(void) { syslog(LOG_NOTICE, "%s by %s: %s", @@ -438,8 +434,7 @@ die_you_gravy_sucking_pig_dog() #define ATOI2(p) (p[0] - '0') * 10 + (p[1] - '0'); p += 2; void -getoffset(timearg) - char *timearg; +getoffset(char *timearg) { struct tm *lt; char *p; @@ -522,7 +517,7 @@ getoffset(timearg) #define FSMSG "fastboot file for fsck\n" void -doitfast() +doitfast(void) { int fastfd; @@ -535,7 +530,7 @@ doitfast() #define NOMSG "\n\nNO LOGINS: System going down at " void -nolog() +nolog(void) { int logfd; char *ct; @@ -557,8 +552,7 @@ nolog() } void -finish(signo) - int signo; +finish(int signo) { if (!killflg) (void)unlink(_PATH_NOLOGIN); @@ -569,13 +563,13 @@ finish(signo) } void -badtime() +badtime(void) { errx(1, "bad time format."); } void -usage() +usage(void) { fprintf(stderr, "usage: shutdown [-dfhknpr] shutdowntime [ message ]\n"); exit(1); diff --git a/sbin/slattach/slattach.c b/sbin/slattach/slattach.c index 10aa62fe797..92b7a01d856 100644 --- a/sbin/slattach/slattach.c +++ b/sbin/slattach/slattach.c @@ -1,4 +1,4 @@ -/* $OpenBSD: slattach.c,v 1.13 2002/05/26 09:24:35 deraadt Exp $ */ +/* $OpenBSD: slattach.c,v 1.14 2002/07/03 22:32:33 deraadt Exp $ */ /* $NetBSD: slattach.c,v 1.17 1996/05/19 21:57:39 jonathan Exp $ */ /* @@ -47,7 +47,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)slattach.c 8.2 (Berkeley) 1/7/94"; #else -static char rcsid[] = "$OpenBSD: slattach.c,v 1.13 2002/05/26 09:24:35 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: slattach.c,v 1.14 2002/07/03 22:32:33 deraadt Exp $"; #endif #endif /* not lint */ @@ -82,17 +82,13 @@ static pid_t pid; /* Our pid */ static FILE *pidfile; void usage(void); - int ttydisc(char *); - void handler(int); volatile sig_atomic_t dying; int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { int fd; char *dev; @@ -193,16 +189,13 @@ main(argc, argv) } void -handler(useless) -int useless; +handler(int useless) { dying = 1; } - int -ttydisc(name) - char *name; +ttydisc(char *name) { if (strcmp(name, "slip") == 0) return(SLIPDISC); @@ -215,7 +208,7 @@ ttydisc(name) } void -usage() +usage(void) { fprintf(stderr, diff --git a/sbin/swapctl/swapctl.c b/sbin/swapctl/swapctl.c index 74bfbe0dd5a..33b7e28bdea 100644 --- a/sbin/swapctl/swapctl.c +++ b/sbin/swapctl/swapctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: swapctl.c,v 1.9 2002/05/15 23:30:08 art Exp $ */ +/* $OpenBSD: swapctl.c,v 1.10 2002/07/03 22:32:33 deraadt Exp $ */ /* $NetBSD: swapctl.c,v 1.9 1998/07/26 20:23:15 mycroft Exp $ */ /* @@ -116,9 +116,7 @@ static int swapon_command(int, char **); extern char *__progname; /* from crt0.o */ int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { int c; @@ -242,9 +240,7 @@ main(argc, argv) * swapon_command: emulate the old swapon(8) program. */ int -swapon_command(argc, argv) - int argc; - char **argv; +swapon_command(int argc, char **argv) { int ch, fiztab = 0; @@ -297,8 +293,7 @@ swapon_command(argc, argv) * change_priority: change the priority of a swap device. */ void -change_priority(path) - char *path; +change_priority(char *path) { if (swapctl(SWAP_CTL, path, pri) < 0) @@ -309,8 +304,7 @@ change_priority(path) * add_swap: add the pathname to the list of swap devices. */ void -add_swap(path) - char *path; +add_swap(char *path) { if (swapctl(SWAP_ON, path, pri) < 0) @@ -322,8 +316,7 @@ add_swap(path) * del_swap: remove the pathname from the list of swap devices. */ void -del_swap(path) - char *path; +del_swap(char *path) { if (swapctl(SWAP_OFF, path, pri) < 0) @@ -331,7 +324,7 @@ del_swap(path) } void -do_fstab() +do_fstab(void) { struct fstab *fp; char *s; @@ -441,7 +434,7 @@ do_fstab() } void -usage() +usage(void) { fprintf(stderr, "usage: %s -A [-p priority] [-t blk|noblk]\n", diff --git a/sbin/swapctl/swaplist.c b/sbin/swapctl/swaplist.c index 695642c040a..8447688c9d6 100644 --- a/sbin/swapctl/swaplist.c +++ b/sbin/swapctl/swaplist.c @@ -1,4 +1,4 @@ -/* $OpenBSD: swaplist.c,v 1.3 2000/02/26 04:06:23 hugh Exp $ */ +/* $OpenBSD: swaplist.c,v 1.4 2002/07/03 22:32:34 deraadt Exp $ */ /* $NetBSD: swaplist.c,v 1.8 1998/10/08 10:00:31 mrg Exp $ */ /* @@ -50,12 +50,7 @@ #include "swapctl.h" void -list_swap(pri, kflag, pflag, tflag, dolong) - int pri; - int kflag; - int pflag; - int tflag; - int dolong; +list_swap(int pri, int kflag, int pflag, int tflag, int dolong) { struct swapent *sep, *fsep; long blocksize; diff --git a/sbin/sysctl/pathconf.c b/sbin/sysctl/pathconf.c index 8cd574cddac..936ca4665e7 100644 --- a/sbin/sysctl/pathconf.c +++ b/sbin/sysctl/pathconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pathconf.c,v 1.5 2001/06/04 14:59:50 mickey Exp $ */ +/* $OpenBSD: pathconf.c,v 1.6 2002/07/03 22:32:34 deraadt Exp $ */ /* $NetBSD: pathconf.c,v 1.2 1995/09/30 07:12:47 thorpej Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)pathconf.c 8.1 (Berkeley) 6/6/93"; #else -static char rcsid[] = "$OpenBSD: pathconf.c,v 1.5 2001/06/04 14:59:50 mickey Exp $"; +static char rcsid[] = "$OpenBSD: pathconf.c,v 1.6 2002/07/03 22:32:34 deraadt Exp $"; #endif #endif /* not lint */ @@ -83,9 +83,7 @@ struct list pclist = { pcnames, PC_MAXID }; int Aflag, aflag, nflag, wflag, stdinflag; int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { char *path; int ch; @@ -132,9 +130,7 @@ main(argc, argv) /* * List all variables known to the system. */ -listall(path, lp) - char *path; - struct list *lp; +listall(char *path, struct list *lp) { int lvl2; @@ -151,10 +147,7 @@ listall(path, lp) * Parse a name into an index. * Lookup and print out the attribute if it exists. */ -parse(pathname, string, flags) - char *pathname; - char *string; - int flags; +parse(char *pathname, char *string, int flags) { int indx, value; char *bufp, buf[BUFSIZ]; @@ -199,11 +192,7 @@ parse(pathname, string, flags) /* * Scan a list of names searching for a particular name. */ -findname(string, level, bufp, namelist) - char *string; - char *level; - char **bufp; - struct list *namelist; +findname(char *string, char *level, char **bufp, struct list *namelist) { char *name; int i; @@ -224,7 +213,7 @@ findname(string, level, bufp, namelist) return (i); } -usage() +usage(void) { (void)fprintf(stderr, "usage:\t%s\n\t%s\n\t%s\n", diff --git a/sbin/sysctl/sysctl.c b/sbin/sysctl/sysctl.c index 70495b7dd60..e1f1cc79827 100644 --- a/sbin/sysctl/sysctl.c +++ b/sbin/sysctl/sysctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sysctl.c,v 1.82 2002/06/09 08:13:09 todd Exp $ */ +/* $OpenBSD: sysctl.c,v 1.83 2002/07/03 22:32:34 deraadt Exp $ */ /* $NetBSD: sysctl.c,v 1.9 1995/09/30 07:12:50 thorpej Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)sysctl.c 8.5 (Berkeley) 5/9/95"; #else -static char *rcsid = "$OpenBSD: sysctl.c,v 1.82 2002/06/09 08:13:09 todd Exp $"; +static char *rcsid = "$OpenBSD: sysctl.c,v 1.83 2002/07/03 22:32:34 deraadt Exp $"; #endif #endif /* not lint */ @@ -205,9 +205,7 @@ int sysctl_chipset(char *, char **, int *, int, int *); void vfsinit(void); int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { int ch, lvl1; @@ -255,9 +253,7 @@ main(argc, argv) * List all variables known to the system. */ void -listall(prefix, lp) - char *prefix; - struct list *lp; +listall(char *prefix, struct list *lp) { char *cp, name[BUFSIZ]; int lvl2, len; @@ -284,9 +280,7 @@ listall(prefix, lp) * Set a new value if requested. */ void -parse(string, flags) - char *string; - int flags; +parse(char *string, int flags) { int indx, type, state, intval, len; size_t size, newsize = 0; @@ -676,9 +670,15 @@ parse(string, flags) if (!nflag) (void)printf("%s = ", string); - (void)printf("(inuse = %ld, calls = %ld, memuse = %ldK, limblocks = %d, mapblocks = %d, maxused = %ldK, limit = %ldK, spare = %ld, sizes = (", km->ks_inuse, km->ks_calls, (km->ks_memuse + 1023) / 1024, km->ks_limblocks, km->ks_mapblocks, (km->ks_maxused + 1023) / 1024, (km->ks_limit + 1023) / 1024, km->ks_spare); + (void)printf("(inuse = %ld, calls = %ld, memuse = %ldK, " + "limblocks = %d, mapblocks = %d, maxused = %ldK, " + "limit = %ldK, spare = %ld, sizes = (", + km->ks_inuse, km->ks_calls, + (km->ks_memuse + 1023) / 1024, km->ks_limblocks, + km->ks_mapblocks, (km->ks_maxused + 1023) / 1024, + (km->ks_limit + 1023) / 1024, km->ks_spare); for (j = 1 << MINBUCKET; j < 1 << (MINBUCKET + 16); j <<= 1) { - if ((km->ks_size & j ) == 0) + if ((km->ks_size & j ) == 0) continue; if (first) (void)printf("%d", j); @@ -790,11 +790,14 @@ parse(string, flags) (unsigned long long)rndstats->rnd_deqs, (unsigned long long)rndstats->rnd_drops, (unsigned long long)rndstats->rnd_drople); - for (i = 0; i < sizeof(rndstats->rnd_ed)/sizeof(rndstats->rnd_ed[0]); i++) + for (i = 0; i < sizeof(rndstats->rnd_ed)/sizeof(rndstats->rnd_ed[0]); + i++) (void)printf(" %llu", (unsigned long long)rndstats->rnd_ed[i]); - for (i = 0; i < sizeof(rndstats->rnd_sc)/sizeof(rndstats->rnd_sc[0]); i++) + for (i = 0; i < sizeof(rndstats->rnd_sc)/sizeof(rndstats->rnd_sc[0]); + i++) (void)printf(" %llu", (unsigned long long)rndstats->rnd_sc[i]); - for (i = 0; i < sizeof(rndstats->rnd_sb)/sizeof(rndstats->rnd_sb[0]); i++) + for (i = 0; i < sizeof(rndstats->rnd_sb)/sizeof(rndstats->rnd_sb[0]); + i++) (void)printf(" %llu", (unsigned long long)rndstats->rnd_sb[i]); printf("\n"); return; @@ -892,14 +895,8 @@ parse(string, flags) } void -parse_baddynamic(mib, len, string, newvalp, newsizep, flags, nflag) - int mib[]; - size_t len; - char *string; - void **newvalp; - size_t *newsizep; - int flags; - int nflag; +parse_baddynamic(int mib[], size_t len, char *string, void **newvalp, + size_t *newsizep, int flags, int nflag) { static u_int32_t newbaddynamic[DP_MAPSIZE]; in_port_t port; @@ -949,7 +946,7 @@ parse_baddynamic(mib, len, string, newvalp, newsizep, flags, nflag) * Initialize the set of debugging names */ void -debuginit() +debuginit(void) { int mib[3], loc, i; size_t size; @@ -981,7 +978,7 @@ int *vfs_typenums; * Initialize the set of filesystem names */ void -vfsinit() +vfsinit(void) { int mib[4], maxtypenum, cnt, loc, size; struct vfsconf vfc; @@ -1049,12 +1046,7 @@ vfsinit() } int -sysctl_vfsgen(string, bufpp, mib, flags, typep) - char *string; - char **bufpp; - int mib[]; - int flags; - int *typep; +sysctl_vfsgen(char *string, char **bufpp, int mib[], int flags, int *typep) { int indx; size_t size; @@ -1090,12 +1082,7 @@ sysctl_vfsgen(string, bufpp, mib, flags, typep) } int -sysctl_vfs(string, bufpp, mib, flags, typep) - char *string; - char **bufpp; - int mib[]; - int flags; - int *typep; +sysctl_vfs(char *string, char **bufpp, int mib[], int flags, int *typep) { struct list *lp = &vfsvars[mib[1]]; int indx; @@ -1125,12 +1112,7 @@ struct list fslist = { posixname, FS_POSIX_MAXID }; * handle file system requests */ int -sysctl_fs(string, bufpp, mib, flags, typep) - char *string; - char **bufpp; - int mib[]; - int flags; - int *typep; +sysctl_fs(char *string, char **bufpp, int mib[], int flags, int *typep) { int indx; @@ -1153,12 +1135,7 @@ struct list bioslist = { biosname, BIOS_MAXID }; * handle BIOS requests */ int -sysctl_bios(string, bufpp, mib, flags, typep) - char *string; - char **bufpp; - int mib[]; - int flags; - int *typep; +sysctl_bios(char *string, char **bufpp, int mib[], int flags, int *typep) { char *name; int indx; @@ -1203,12 +1180,7 @@ struct list swpenclist = { swpencname, SWPENC_MAXID }; * handle swap encrypt requests */ int -sysctl_swpenc(string, bufpp, mib, flags, typep) - char *string; - char **bufpp; - int mib[]; - int flags; - int *typep; +sysctl_swpenc(char *string, char **bufpp, int mib[], int flags, int *typep) { int indx; @@ -1357,12 +1329,7 @@ struct list ttylist = { ttyname, KERN_TTY_MAXID }; * handle vfs namei cache statistics */ int -sysctl_nchstats(string, bufpp, mib, flags, typep) - char *string; - char **bufpp; - int mib[]; - int flags; - int *typep; +sysctl_nchstats(char *string, char **bufpp, int mib[], int flags, int *typep) { static struct nchstats nch; int indx; @@ -1422,12 +1389,7 @@ sysctl_nchstats(string, bufpp, mib, flags, typep) * handle tty statistics */ int -sysctl_tty(string, bufpp, mib, flags, typep) - char *string; - char **bufpp; - int mib[]; - int flags; - int *typep; +sysctl_tty(char *string, char **bufpp, int mib[], int flags, int *typep) { int indx; @@ -1446,12 +1408,7 @@ sysctl_tty(string, bufpp, mib, flags, typep) * handle fork statistics */ int -sysctl_forkstat(string, bufpp, mib, flags, typep) - char *string; - char **bufpp; - int mib[]; - int flags; - int *typep; +sysctl_forkstat(char *string, char **bufpp, int mib[], int flags, int *typep) { static struct forkstat fks; static int keepvalue = 0; @@ -1510,12 +1467,7 @@ sysctl_forkstat(string, bufpp, mib, flags, typep) * handle malloc statistics */ int -sysctl_malloc(string, bufpp, mib, flags, typep) - char *string; - char **bufpp; - int mib[]; - int flags; - int *typep; +sysctl_malloc(char *string, char **bufpp, int mib[], int flags, int *typep) { int indx, stor, i; char *name, bufp[BUFSIZ], *buf, *ptr; @@ -1626,12 +1578,7 @@ struct ctlname chipsetname[] = CTL_CHIPSET_NAMES; struct list chipsetlist = { chipsetname, CPU_CHIPSET_MAXID }; int -sysctl_chipset(string, bufpp, mib, flags, typep) - char *string; - char **bufpp; - int mib[]; - int flags; - int *typep; +sysctl_chipset(char *string, char **bufpp, int mib[], int flags, int *typep) { int indx, bwx; static void *q; @@ -1682,12 +1629,7 @@ sysctl_chipset(string, bufpp, mib, flags, typep) * handle internet requests */ int -sysctl_inet(string, bufpp, mib, flags, typep) - char *string; - char **bufpp; - int mib[]; - int flags; - int *typep; +sysctl_inet(char *string, char **bufpp, int mib[], int flags, int *typep) { struct list *lp; int indx; @@ -1767,12 +1709,7 @@ struct list inet6vars[] = { * handle internet6 requests */ int -sysctl_inet6(string, bufpp, mib, flags, typep) - char *string; - char **bufpp; - int mib[]; - int flags; - int *typep; +sysctl_inet6(char *string, char **bufpp, int mib[], int flags, int *typep) { struct list *lp; int indx; @@ -1821,12 +1758,7 @@ struct list ipxvars[] = { * Handle internet requests */ int -sysctl_ipx(string, bufpp, mib, flags, typep) - char *string; - char **bufpp; - int mib[]; - int flags; - int *typep; +sysctl_ipx(char *string, char **bufpp, int mib[], int flags, int *typep) { struct list *lp; int indx; @@ -1861,11 +1793,7 @@ sysctl_ipx(string, bufpp, mib, flags, typep) * Scan a list of names searching for a particular name. */ int -findname(string, level, bufp, namelist) - char *string; - char *level; - char **bufp; - struct list *namelist; +findname(char *string, char *level, char **bufp, struct list *namelist) { char *name; int i; @@ -1886,7 +1814,7 @@ findname(string, level, bufp, namelist) } void -usage() +usage(void) { (void)fprintf(stderr, "usage:\t%s\n\t%s\n\t%s\n\t%s\n", diff --git a/sbin/ttyflags/ttyflags.c b/sbin/ttyflags/ttyflags.c index f30574fec65..b65f1f26119 100644 --- a/sbin/ttyflags/ttyflags.c +++ b/sbin/ttyflags/ttyflags.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ttyflags.c,v 1.9 2002/05/29 19:23:34 deraadt Exp $ */ +/* $OpenBSD: ttyflags.c,v 1.10 2002/07/03 22:32:34 deraadt Exp $ */ /* $NetBSD: ttyflags.c,v 1.8 1996/04/09 05:20:30 cgd Exp $ */ /* @@ -39,7 +39,7 @@ char copyright[] = #endif /* not lint */ #ifndef lint -static char rcsid[] = "$OpenBSD: ttyflags.c,v 1.9 2002/05/29 19:23:34 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: ttyflags.c,v 1.10 2002/07/03 22:32:34 deraadt Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -70,9 +70,7 @@ int nflag, vflag; * the flags of the ttys specified on the command line. */ int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { int aflag, ch, rval, pflag = 0; @@ -119,8 +117,7 @@ main(argc, argv) * Change all /etc/ttys entries' flags. */ int -all(print) - int print; +all(int print) { struct ttyent *tep; int rval; @@ -136,9 +133,7 @@ all(print) * Change the specified ttys' flags. */ int -ttys(ttylist, print) - char **ttylist; - int print; +ttys(char **ttylist, int print) { struct ttyent *tep; int rval; @@ -165,9 +160,7 @@ ttys(ttylist, print) * open the device, and change the flags. */ int -ttyflags(tep, print) - struct ttyent *tep; - int print; +ttyflags(struct ttyent *tep, int print) { int fd, flags = 0, rval = 0, st, sep = 0; char path[PATH_MAX]; @@ -264,7 +257,7 @@ ttyflags(tep, print) * Print usage information when a bogus set of arguments is given. */ void -usage() +usage(void) { (void)fprintf(stderr, "usage: ttyflags [-v] [-p] [-a | tty ... ]\n"); exit(1); diff --git a/sbin/tunefs/tunefs.c b/sbin/tunefs/tunefs.c index 7674725d66c..71efa690455 100644 --- a/sbin/tunefs/tunefs.c +++ b/sbin/tunefs/tunefs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tunefs.c,v 1.20 2002/06/09 08:13:09 todd Exp $ */ +/* $OpenBSD: tunefs.c,v 1.21 2002/07/03 22:32:34 deraadt Exp $ */ /* $NetBSD: tunefs.c,v 1.10 1995/03/18 15:01:31 cgd Exp $ */ /* @@ -45,7 +45,7 @@ static const char copyright[] = static char sccsid[] = "@(#)tunefs.c 8.2 (Berkeley) 4/19/94"; #else static const char rcsid[] = - "$OpenBSD: tunefs.c,v 1.20 2002/06/09 08:13:09 todd Exp $"; + "$OpenBSD: tunefs.c,v 1.21 2002/07/03 22:32:34 deraadt Exp $"; #endif #endif /* not lint */ @@ -87,9 +87,7 @@ void printfs(void); extern char *__progname; int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { char *cp, *special, *name; struct stat st; @@ -279,7 +277,7 @@ again: } void -usage() +usage(void) { fprintf(stderr, "Usage: %s tuneup-options special-device\n" @@ -298,10 +296,7 @@ usage() } void -getsb(fs, file, flags) - struct fs *fs; - char *file; - int flags; +getsb(struct fs *fs, char *file, int flags) { if (fi >= 0) @@ -317,7 +312,7 @@ getsb(fs, file, flags) } void -printfs() +printfs(void) { warnx("maximum contiguous block count: (-a) %d", sblock.fs_maxcontig); @@ -342,10 +337,7 @@ printfs() } void -bwrite(blk, buf, size) - daddr_t blk; - char *buf; - int size; +bwrite(daddr_t blk, char *buf, int size) { if (lseek(fi, (off_t)blk * dev_bsize, SEEK_SET) < 0) @@ -355,10 +347,7 @@ bwrite(blk, buf, size) } int -bread(bno, buf, cnt) - daddr_t bno; - char *buf; - int cnt; +bread(daddr_t bno, char *buf, int cnt) { int i; diff --git a/sbin/umount/umount.c b/sbin/umount/umount.c index f7406220f87..cca953abb66 100644 --- a/sbin/umount/umount.c +++ b/sbin/umount/umount.c @@ -1,4 +1,4 @@ -/* $OpenBSD: umount.c,v 1.13 2002/02/16 21:27:38 millert Exp $ */ +/* $OpenBSD: umount.c,v 1.14 2002/07/03 22:32:34 deraadt Exp $ */ /* $NetBSD: umount.c,v 1.16 1996/05/11 14:13:55 mycroft Exp $ */ /*- @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)umount.c 8.3 (Berkeley) 2/20/94"; #else -static char rcsid[] = "$OpenBSD: umount.c,v 1.13 2002/02/16 21:27:38 millert Exp $"; +static char rcsid[] = "$OpenBSD: umount.c,v 1.14 2002/07/03 22:32:34 deraadt Exp $"; #endif #endif /* not lint */ @@ -84,9 +84,7 @@ void usage(void); int xdr_dir(XDR *, char *); int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { int all, ch, errs; @@ -141,7 +139,7 @@ main(argc, argv) } int -umountall() +umountall(void) { struct statfs *fs; int n; @@ -165,8 +163,7 @@ umountall() } int -umountfs(oname) - char *oname; +umountfs(char *oname) { enum clnt_stat clnt_stat; struct hostent *hp; @@ -276,10 +273,7 @@ umountfs(oname) } char * -getmntname(name, what, type) - char *name; - mntwhat what; - char *type; +getmntname(char *name, mntwhat what, char *type) { struct statfs *mntbuf; int i, mntsize; @@ -308,8 +302,7 @@ getmntname(name, what, type) static enum { IN_LIST, NOT_IN_LIST } which; int -selected(type) - const char *type; +selected(const char *type) { char **av; @@ -323,8 +316,7 @@ selected(type) } void -maketypelist(fslist) - char *fslist; +maketypelist(char *fslist) { int i; char *nextcp, **av; @@ -360,8 +352,7 @@ maketypelist(fslist) } int -namematch(hp) - struct hostent *hp; +namematch(struct hostent *hp) { char *cp, **np; @@ -392,15 +383,13 @@ namematch(hp) * xdr routines for mount rpc's */ int -xdr_dir(xdrsp, dirp) - XDR *xdrsp; - char *dirp; +xdr_dir(XDR *xdrsp, char *dirp) { return (xdr_string(xdrsp, &dirp, RPCMNT_PATHLEN)); } void -usage() +usage(void) { (void)fprintf(stderr, "usage: %s\n %s\n", |