diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1997-01-15 23:44:39 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1997-01-15 23:44:39 +0000 |
commit | 552d265b6ced1e56d31f20f16a7fe9ae818d568b (patch) | |
tree | 219a59b7e7a5ef53ddfc66cdc38e73e3f79258c8 /sbin | |
parent | bf6413046b73005ecca3f5352c8711d00a6d00b9 (diff) |
getopt(3) returns -1 when out of args, not EOF, whee!
Diffstat (limited to 'sbin')
40 files changed, 108 insertions, 108 deletions
diff --git a/sbin/bim/bim.c b/sbin/bim/bim.c index 5c8daecbc75..bbb52f522ed 100644 --- a/sbin/bim/bim.c +++ b/sbin/bim/bim.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bim.c,v 1.2 1996/06/23 14:29:56 deraadt Exp $ */ +/* $OpenBSD: bim.c,v 1.3 1997/01/15 23:41:09 millert Exp $ */ /* $NetBSD: bim.c,v 1.4 1995/09/28 07:08:49 phil Exp $ */ /* @@ -618,7 +618,7 @@ char *argv[]; cmdscnt = 0; opterr = TRUE; fname = DEFAULT_DEVICE; - while ((optchar = getopt (argc, argv, "c:")) != EOF) + while ((optchar = getopt (argc, argv, "c:")) != -1) switch (optchar) { case 'c': if (cmdscnt == MAXARGCMDS) usage(); argcmds[cmdscnt++] = optarg; diff --git a/sbin/dmesg/dmesg.c b/sbin/dmesg/dmesg.c index 1782a131b08..9e63bd76a53 100644 --- a/sbin/dmesg/dmesg.c +++ b/sbin/dmesg/dmesg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dmesg.c,v 1.3 1996/12/22 03:00:49 deraadt Exp $ */ +/* $OpenBSD: dmesg.c,v 1.4 1997/01/15 23:41:10 millert 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.3 1996/12/22 03:00:49 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: dmesg.c,v 1.4 1997/01/15 23:41:10 millert Exp $"; #endif #endif /* not lint */ @@ -86,7 +86,7 @@ main(argc, argv) char buf[5]; memf = nlistf = NULL; - while ((ch = getopt(argc, argv, "M:N:")) != EOF) + while ((ch = getopt(argc, argv, "M:N:")) != -1) switch(ch) { case 'M': memf = optarg; diff --git a/sbin/fsck_ffs/main.c b/sbin/fsck_ffs/main.c index 27908279056..09c26a2eca8 100644 --- a/sbin/fsck_ffs/main.c +++ b/sbin/fsck_ffs/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.6 1996/10/20 08:36:35 tholo Exp $ */ +/* $OpenBSD: main.c,v 1.7 1997/01/15 23:41:46 millert Exp $ */ /* $NetBSD: main.c,v 1.22 1996/10/11 20:15:48 thorpej Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)main.c 8.2 (Berkeley) 1/23/94"; #else -static char rcsid[] = "$OpenBSD: main.c,v 1.6 1996/10/20 08:36:35 tholo Exp $"; +static char rcsid[] = "$OpenBSD: main.c,v 1.7 1997/01/15 23:41:46 millert Exp $"; #endif #endif /* not lint */ @@ -82,7 +82,7 @@ main(argc, argv) sync(); skipclean = 1; - while ((ch = getopt(argc, argv, "dfpnNyYb:c:l:m:")) != EOF) { + while ((ch = getopt(argc, argv, "dfpnNyYb:c:l:m:")) != -1) { switch (ch) { case 'p': preen++; diff --git a/sbin/fsck_msdos/main.c b/sbin/fsck_msdos/main.c index 4ee85d06814..dd6c38901c0 100644 --- a/sbin/fsck_msdos/main.c +++ b/sbin/fsck_msdos/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.3 1996/06/23 14:30:45 deraadt Exp $ */ +/* $OpenBSD: main.c,v 1.4 1997/01/15 23:41:47 millert Exp $ */ /* $NetBSD: main.c,v 1.1.4.1 1996/05/31 18:41:54 jtc Exp $ */ /* @@ -35,7 +35,7 @@ #ifndef lint -static char rcsid[] = "$OpenBSD: main.c,v 1.3 1996/06/23 14:30:45 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: main.c,v 1.4 1997/01/15 23:41:47 millert Exp $"; #endif /* not lint */ #include <stdlib.h> @@ -74,7 +74,7 @@ main(argc, argv) int ret = 0, erg; int ch; - while ((ch = getopt(argc, argv, "vpyn")) != EOF) { + while ((ch = getopt(argc, argv, "vpyn")) != -1) { switch (ch) { case 'n': alwaysno = 1; diff --git a/sbin/modload/modload.c b/sbin/modload/modload.c index 4aec3c69911..3551f9219a1 100644 --- a/sbin/modload/modload.c +++ b/sbin/modload/modload.c @@ -1,4 +1,4 @@ -/* $OpenBSD: modload.c,v 1.9 1996/09/16 01:37:00 deraadt Exp $ */ +/* $OpenBSD: modload.c,v 1.10 1997/01/15 23:41:14 millert Exp $ */ /* $NetBSD: modload.c,v 1.13 1995/05/28 05:21:58 jtc Exp $ */ /* @@ -172,7 +172,7 @@ main(argc, argv) char buf[MODIOBUF]; char *symbuf; - while ((c = getopt(argc, argv, "dvsuqA:e:p:o:")) != EOF) { + while ((c = getopt(argc, argv, "dvsuqA:e:p:o:")) != -1) { switch (c) { case 'd': debug = 1; diff --git a/sbin/modunload/modunload.c b/sbin/modunload/modunload.c index 4e5f7645ee6..b27c00b13b4 100644 --- a/sbin/modunload/modunload.c +++ b/sbin/modunload/modunload.c @@ -1,4 +1,4 @@ -/* $OpenBSD: modunload.c,v 1.4 1996/08/05 11:05:21 mickey Exp $ */ +/* $OpenBSD: modunload.c,v 1.5 1997/01/15 23:41:14 millert Exp $ */ /* $NetBSD: modunload.c,v 1.9 1995/05/28 05:23:05 jtc Exp $ */ /* @@ -76,7 +76,7 @@ main(argc, argv) char *modname = NULL; struct lmc_unload ulbuf; - while ((c = getopt(argc, argv, "i:n:")) != EOF) { + while ((c = getopt(argc, argv, "i:n:")) != -1) { switch (c) { case 'i': modnum = atoi(optarg); diff --git a/sbin/mount/mount.c b/sbin/mount/mount.c index 1efd465ef66..5f1465322fa 100644 --- a/sbin/mount/mount.c +++ b/sbin/mount/mount.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mount.c,v 1.12 1996/12/23 08:38:49 downsj Exp $ */ +/* $OpenBSD: mount.c,v 1.13 1997/01/15 23:41:15 millert 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.12 1996/12/23 08:38:49 downsj Exp $"; +static char rcsid[] = "$OpenBSD: mount.c,v 1.13 1997/01/15 23:41:15 millert Exp $"; #endif #endif /* not lint */ @@ -120,7 +120,7 @@ main(argc, argv) all = forceall = init_flags = 0; options = NULL; vfstype = "ffs"; - while ((ch = getopt(argc, argv, "Aadfo:rwt:uv")) != EOF) + while ((ch = getopt(argc, argv, "Aadfo:rwt:uv")) != -1) switch (ch) { case 'A': all = forceall = 1; diff --git a/sbin/mount_ados/mount_ados.c b/sbin/mount_ados/mount_ados.c index 52105cb3135..07e3ad7ca5c 100644 --- a/sbin/mount_ados/mount_ados.c +++ b/sbin/mount_ados/mount_ados.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mount_ados.c,v 1.4 1996/12/16 17:11:36 deraadt Exp $ */ +/* $OpenBSD: mount_ados.c,v 1.5 1997/01/15 23:41:16 millert Exp $ */ /* $NetBSD: mount_ados.c,v 1.5 1996/04/13 01:30:59 jtc Exp $ */ /* @@ -32,7 +32,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: mount_ados.c,v 1.4 1996/12/16 17:11:36 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: mount_ados.c,v 1.5 1997/01/15 23:41:16 millert Exp $"; #endif /* not lint */ #include <sys/cdefs.h> @@ -73,7 +73,7 @@ main(argc, argv) mntflags = set_gid = set_uid = set_mask = 0; (void)memset(&args, '\0', sizeof(args)); - while ((c = getopt(argc, argv, "u:g:m:o:")) != EOF) { + while ((c = getopt(argc, argv, "u:g:m:o:")) != -1) { switch (c) { case 'u': args.uid = a_uid(optarg); diff --git a/sbin/mount_cd9660/mount_cd9660.c b/sbin/mount_cd9660/mount_cd9660.c index b1ec2d8d550..63ec59857f8 100644 --- a/sbin/mount_cd9660/mount_cd9660.c +++ b/sbin/mount_cd9660/mount_cd9660.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mount_cd9660.c,v 1.3 1996/06/23 14:31:16 deraadt Exp $ */ +/* $OpenBSD: mount_cd9660.c,v 1.4 1997/01/15 23:41:17 millert Exp $ */ /* $NetBSD: mount_cd9660.c,v 1.3 1996/04/13 01:31:08 jtc Exp $ */ /* @@ -49,7 +49,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)mount_cd9660.c 8.4 (Berkeley) 3/27/94"; #else -static char rcsid[] = "$OpenBSD: mount_cd9660.c,v 1.3 1996/06/23 14:31:16 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: mount_cd9660.c,v 1.4 1997/01/15 23:41:17 millert Exp $"; #endif #endif /* not lint */ @@ -83,7 +83,7 @@ main(argc, argv) char *dev, *dir; mntflags = opts = 0; - while ((ch = getopt(argc, argv, "ego:r")) != EOF) + while ((ch = getopt(argc, argv, "ego:r")) != -1) switch (ch) { case 'e': opts |= ISOFSMNT_EXTATT; diff --git a/sbin/mount_ext2fs/mount_ext2fs.c b/sbin/mount_ext2fs/mount_ext2fs.c index 7f6eee62847..441010ec7f6 100644 --- a/sbin/mount_ext2fs/mount_ext2fs.c +++ b/sbin/mount_ext2fs/mount_ext2fs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mount_ext2fs.c,v 1.1 1996/06/27 07:20:28 downsj Exp $ */ +/* $OpenBSD: mount_ext2fs.c,v 1.2 1997/01/15 23:41:18 millert Exp $ */ /* $NetBSD: mount_ffs.c,v 1.3 1996/04/13 01:31:19 jtc Exp $ */ /*- @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)mount_ufs.c 8.2 (Berkeley) 3/27/94"; #else -static char rcsid[] = "$OpenBSD: mount_ext2fs.c,v 1.1 1996/06/27 07:20:28 downsj Exp $"; +static char rcsid[] = "$OpenBSD: mount_ext2fs.c,v 1.2 1997/01/15 23:41:18 millert Exp $"; #endif #endif /* not lint */ @@ -80,7 +80,7 @@ main(argc, argv) mntflags = 0; optind = optreset = 1; /* Reset for parse of new argv. */ - while ((ch = getopt(argc, argv, "o:")) != EOF) + while ((ch = getopt(argc, argv, "o:")) != -1) switch (ch) { case 'o': getmntopts(optarg, mopts, &mntflags); diff --git a/sbin/mount_fdesc/mount_fdesc.c b/sbin/mount_fdesc/mount_fdesc.c index 221ff6e1e2a..94133ec7b64 100644 --- a/sbin/mount_fdesc/mount_fdesc.c +++ b/sbin/mount_fdesc/mount_fdesc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mount_fdesc.c,v 1.3 1996/06/23 14:31:19 deraadt Exp $ */ +/* $OpenBSD: mount_fdesc.c,v 1.4 1997/01/15 23:41:19 millert Exp $ */ /* $NetBSD: mount_fdesc.c,v 1.7 1996/04/13 01:31:15 jtc Exp $ */ /* @@ -48,7 +48,7 @@ char copyright[] = #if 0 static char sccsid[] = "@(#)mount_fdesc.c 8.2 (Berkeley) 3/27/94"; #else -static char rcsid[] = "$OpenBSD: mount_fdesc.c,v 1.3 1996/06/23 14:31:19 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: mount_fdesc.c,v 1.4 1997/01/15 23:41:19 millert Exp $"; #endif #endif /* not lint */ @@ -78,7 +78,7 @@ main(argc, argv) int ch, mntflags; mntflags = 0; - while ((ch = getopt(argc, argv, "o:")) != EOF) + while ((ch = getopt(argc, argv, "o:")) != -1) switch (ch) { case 'o': getmntopts(optarg, mopts, &mntflags); diff --git a/sbin/mount_ffs/mount_ffs.c b/sbin/mount_ffs/mount_ffs.c index f88975e0226..e3c05c6e0e5 100644 --- a/sbin/mount_ffs/mount_ffs.c +++ b/sbin/mount_ffs/mount_ffs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mount_ffs.c,v 1.4 1996/06/23 14:31:20 deraadt Exp $ */ +/* $OpenBSD: mount_ffs.c,v 1.5 1997/01/15 23:41:20 millert Exp $ */ /* $NetBSD: mount_ffs.c,v 1.3 1996/04/13 01:31:19 jtc Exp $ */ /*- @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)mount_ufs.c 8.2 (Berkeley) 3/27/94"; #else -static char rcsid[] = "$OpenBSD: mount_ffs.c,v 1.4 1996/06/23 14:31:20 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: mount_ffs.c,v 1.5 1997/01/15 23:41:20 millert Exp $"; #endif #endif /* not lint */ @@ -83,7 +83,7 @@ main(argc, argv) mntflags = 0; optind = optreset = 1; /* Reset for parse of new argv. */ - while ((ch = getopt(argc, argv, "o:")) != EOF) + while ((ch = getopt(argc, argv, "o:")) != -1) switch (ch) { case 'o': getmntopts(optarg, mopts, &mntflags); diff --git a/sbin/mount_kernfs/mount_kernfs.c b/sbin/mount_kernfs/mount_kernfs.c index 04af851fffc..b7d10b38fcf 100644 --- a/sbin/mount_kernfs/mount_kernfs.c +++ b/sbin/mount_kernfs/mount_kernfs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mount_kernfs.c,v 1.3 1996/06/23 14:31:22 deraadt Exp $ */ +/* $OpenBSD: mount_kernfs.c,v 1.4 1997/01/15 23:41:21 millert Exp $ */ /* $NetBSD: mount_kernfs.c,v 1.8 1996/04/13 05:35:39 cgd Exp $ */ /* @@ -48,7 +48,7 @@ char copyright[] = #if 0 static char sccsid[] = "@(#)mount_kernfs.c 8.2 (Berkeley) 3/27/94"; #else -static char rcsid[] = "$OpenBSD: mount_kernfs.c,v 1.3 1996/06/23 14:31:22 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: mount_kernfs.c,v 1.4 1997/01/15 23:41:21 millert Exp $"; #endif #endif /* not lint */ @@ -78,7 +78,7 @@ main(argc, argv) int ch, mntflags; mntflags = 0; - while ((ch = getopt(argc, argv, "o:")) != EOF) + while ((ch = getopt(argc, argv, "o:")) != -1) switch (ch) { case 'o': getmntopts(optarg, mopts, &mntflags); diff --git a/sbin/mount_lfs/mount_lfs.c b/sbin/mount_lfs/mount_lfs.c index fcec7fa7902..3e4c35ef43b 100644 --- a/sbin/mount_lfs/mount_lfs.c +++ b/sbin/mount_lfs/mount_lfs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mount_lfs.c,v 1.4 1996/12/09 13:38:47 deraadt Exp $ */ +/* $OpenBSD: mount_lfs.c,v 1.5 1997/01/15 23:41:22 millert Exp $ */ /* $NetBSD: mount_lfs.c,v 1.4 1996/04/13 05:35:44 cgd Exp $ */ /*- @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)mount_lfs.c 8.3 (Berkeley) 3/27/94"; #else -static char rcsid[] = "$OpenBSD: mount_lfs.c,v 1.4 1996/12/09 13:38:47 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: mount_lfs.c,v 1.5 1997/01/15 23:41:22 millert Exp $"; #endif #endif /* not lint */ @@ -85,7 +85,7 @@ main(argc, argv) options = NULL; mntflags = noclean = 0; - while ((ch = getopt(argc, argv, "dno:s")) != EOF) + while ((ch = getopt(argc, argv, "dno:s")) != -1) switch (ch) { case 'd': cleaner_debug = 1; diff --git a/sbin/mount_msdos/mount_msdos.c b/sbin/mount_msdos/mount_msdos.c index a223f2271f3..dd06fe3f167 100644 --- a/sbin/mount_msdos/mount_msdos.c +++ b/sbin/mount_msdos/mount_msdos.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mount_msdos.c,v 1.8 1996/12/16 17:11:38 deraadt Exp $ */ +/* $OpenBSD: mount_msdos.c,v 1.9 1997/01/15 23:41:22 millert Exp $ */ /* $NetBSD: mount_msdos.c,v 1.16 1996/10/24 00:12:50 cgd Exp $ */ /* @@ -32,7 +32,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: mount_msdos.c,v 1.8 1996/12/16 17:11:38 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: mount_msdos.c,v 1.9 1997/01/15 23:41:22 millert Exp $"; #endif /* not lint */ #include <sys/cdefs.h> @@ -76,7 +76,7 @@ main(argc, argv) mntflags = set_gid = set_uid = set_mask = 0; (void)memset(&args, '\0', sizeof(args)); - while ((c = getopt(argc, argv, "Gsl9u:g:m:o:")) != EOF) { + while ((c = getopt(argc, argv, "Gsl9u:g:m:o:")) != -1) { switch (c) { case 'G': args.flags |= MSDOSFSMNT_GEMDOSFS; diff --git a/sbin/mount_null/mount_null.c b/sbin/mount_null/mount_null.c index 08b40c0351e..fd49f42e586 100644 --- a/sbin/mount_null/mount_null.c +++ b/sbin/mount_null/mount_null.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mount_null.c,v 1.3 1996/06/23 14:31:29 deraadt Exp $ */ +/* $OpenBSD: mount_null.c,v 1.4 1997/01/15 23:41:23 millert Exp $ */ /* $NetBSD: mount_null.c,v 1.3 1996/04/13 01:31:49 jtc Exp $ */ /* @@ -47,7 +47,7 @@ char copyright[] = #if 0 static char sccsid[] = "@(#)mount_null.c 8.5 (Berkeley) 3/27/94"; #else -static char rcsid[] = "$OpenBSD: mount_null.c,v 1.3 1996/06/23 14:31:29 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: mount_null.c,v 1.4 1997/01/15 23:41:23 millert Exp $"; #endif #endif /* not lint */ @@ -81,7 +81,7 @@ main(argc, argv) char target[MAXPATHLEN]; mntflags = 0; - while ((ch = getopt(argc, argv, "o:")) != EOF) + while ((ch = getopt(argc, argv, "o:")) != -1) switch(ch) { case 'o': getmntopts(optarg, mopts, &mntflags); diff --git a/sbin/mount_portal/mount_portal.c b/sbin/mount_portal/mount_portal.c index fca5ee1c503..a29fb29f6a2 100644 --- a/sbin/mount_portal/mount_portal.c +++ b/sbin/mount_portal/mount_portal.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mount_portal.c,v 1.4 1996/06/25 21:31:26 deraadt Exp $ */ +/* $OpenBSD: mount_portal.c,v 1.5 1997/01/15 23:41:24 millert Exp $ */ /* $NetBSD: mount_portal.c,v 1.8 1996/04/13 01:31:54 jtc Exp $ */ /* @@ -47,7 +47,7 @@ char copyright[] = #if 0 static char sccsid[] = "@(#)mount_portal.c 8.4 (Berkeley) 3/27/94"; #else -static char rcsid[] = "$OpenBSD: mount_portal.c,v 1.4 1996/06/25 21:31:26 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: mount_portal.c,v 1.5 1997/01/15 23:41:24 millert Exp $"; #endif #endif /* not lint */ @@ -132,7 +132,7 @@ main(argc, argv) */ int ch; - while ((ch = getopt(argc, argv, "o:")) != EOF) { + while ((ch = getopt(argc, argv, "o:")) != -1) { switch (ch) { case 'o': getmntopts(optarg, mopts, &mntflags); diff --git a/sbin/mount_procfs/mount_procfs.c b/sbin/mount_procfs/mount_procfs.c index 55fa0bdf3ab..f03ec7d76d6 100644 --- a/sbin/mount_procfs/mount_procfs.c +++ b/sbin/mount_procfs/mount_procfs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mount_procfs.c,v 1.3 1996/06/23 14:31:38 deraadt Exp $ */ +/* $OpenBSD: mount_procfs.c,v 1.4 1997/01/15 23:41:25 millert Exp $ */ /* $NetBSD: mount_procfs.c,v 1.7 1996/04/13 01:31:59 jtc Exp $ */ /* @@ -48,7 +48,7 @@ char copyright[] = #if 0 static char sccsid[] = "@(#)mount_procfs.c 8.3 (Berkeley) 3/27/94"; #else -static char rcsid[] = "$OpenBSD: mount_procfs.c,v 1.3 1996/06/23 14:31:38 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: mount_procfs.c,v 1.4 1997/01/15 23:41:25 millert Exp $"; #endif #endif /* not lint */ @@ -78,7 +78,7 @@ main(argc, argv) int ch, mntflags; mntflags = 0; - while ((ch = getopt(argc, argv, "o:")) != EOF) + while ((ch = getopt(argc, argv, "o:")) != -1) switch (ch) { case 'o': getmntopts(optarg, mopts, &mntflags); diff --git a/sbin/mount_umap/mount_umap.c b/sbin/mount_umap/mount_umap.c index c1414b5c0fe..1c8cf67453a 100644 --- a/sbin/mount_umap/mount_umap.c +++ b/sbin/mount_umap/mount_umap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mount_umap.c,v 1.4 1996/06/23 14:31:40 deraadt Exp $ */ +/* $OpenBSD: mount_umap.c,v 1.5 1997/01/15 23:41:26 millert Exp $ */ /* $NetBSD: mount_umap.c,v 1.5 1996/04/13 01:32:05 jtc Exp $ */ /* @@ -47,7 +47,7 @@ char copyright[] = #if 0 static char sccsid[] = "@(#)mount_umap.c 8.3 (Berkeley) 3/27/94"; #else -static char rcsid[] = "$OpenBSD: mount_umap.c,v 1.4 1996/06/23 14:31:40 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: mount_umap.c,v 1.5 1997/01/15 23:41:26 millert Exp $"; #endif #endif /* not lint */ @@ -107,7 +107,7 @@ main(argc, argv) mntflags = 0; umapfile = gmapfile = NULL; - while ((ch = getopt(argc, argv, "g:o:u:")) != EOF) + while ((ch = getopt(argc, argv, "g:o:u:")) != -1) switch (ch) { case 'g': gmapfile = optarg; diff --git a/sbin/mount_union/mount_union.c b/sbin/mount_union/mount_union.c index 3a019a90ab6..6650fe9c69b 100644 --- a/sbin/mount_union/mount_union.c +++ b/sbin/mount_union/mount_union.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mount_union.c,v 1.3 1996/06/23 14:31:43 deraadt Exp $ */ +/* $OpenBSD: mount_union.c,v 1.4 1997/01/15 23:41:27 millert Exp $ */ /* $NetBSD: mount_union.c,v 1.3 1996/04/13 01:32:11 jtc Exp $ */ /* @@ -47,7 +47,7 @@ char copyright[] = #if 0 static char sccsid[] = "@(#)mount_union.c 8.5 (Berkeley) 3/27/94"; #else -static char rcsid[] = "$OpenBSD: mount_union.c,v 1.3 1996/06/23 14:31:43 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: mount_union.c,v 1.4 1997/01/15 23:41:27 millert Exp $"; #endif #endif /* not lint */ @@ -83,7 +83,7 @@ main(argc, argv) mntflags = 0; args.mntflags = UNMNT_ABOVE; - while ((ch = getopt(argc, argv, "bo:r")) != EOF) + while ((ch = getopt(argc, argv, "bo:r")) != -1) switch (ch) { case 'b': args.mntflags &= ~UNMNT_OPMASK; diff --git a/sbin/mountd/mountd.c b/sbin/mountd/mountd.c index 542263b9c5b..64babcb94e0 100644 --- a/sbin/mountd/mountd.c +++ b/sbin/mountd/mountd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mountd.c,v 1.13 1996/12/10 07:26:45 deraadt Exp $ */ +/* $OpenBSD: mountd.c,v 1.14 1997/01/15 23:41:28 millert Exp $ */ /* $NetBSD: mountd.c,v 1.31 1996/02/18 11:57:53 fvdl Exp $ */ /* @@ -249,7 +249,7 @@ main(argc, argv) SVCXPRT *udptransp, *tcptransp; int c; - while ((c = getopt(argc, argv, "dnr")) != EOF) + while ((c = getopt(argc, argv, "dnr")) != -1) switch (c) { case 'd': debug = 1; diff --git a/sbin/ncheck_ffs/ncheck_ffs.c b/sbin/ncheck_ffs/ncheck_ffs.c index 216323410ed..7a3596e395c 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.4 1996/08/14 06:41:37 tholo Exp $ */ +/* $OpenBSD: ncheck_ffs.c,v 1.5 1997/01/15 23:41:30 millert 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.4 1996/08/14 06:41:37 tholo Exp $"; +static char rcsid[] = "$OpenBSD: ncheck_ffs.c,v 1.5 1997/01/15 23:41:30 millert Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -438,7 +438,7 @@ main(argc, argv) int c; ino_t ino; - while ((c = getopt(argc, argv, "ai:ms")) != EOF) + while ((c = getopt(argc, argv, "ai:ms")) != -1) switch (c) { case 'a': aflag++; diff --git a/sbin/newfs/newfs.c b/sbin/newfs/newfs.c index 5558ce7241c..81b2332ce0e 100644 --- a/sbin/newfs/newfs.c +++ b/sbin/newfs/newfs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: newfs.c,v 1.9 1996/12/23 07:48:28 downsj Exp $ */ +/* $OpenBSD: newfs.c,v 1.10 1997/01/15 23:41:31 millert Exp $ */ /* $NetBSD: newfs.c,v 1.20 1996/05/16 07:13:03 thorpej Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)newfs.c 8.8 (Berkeley) 4/18/94"; #else -static char rcsid[] = "$OpenBSD: newfs.c,v 1.9 1996/12/23 07:48:28 downsj Exp $"; +static char rcsid[] = "$OpenBSD: newfs.c,v 1.10 1997/01/15 23:41:31 millert Exp $"; #endif #endif /* not lint */ @@ -227,7 +227,7 @@ main(argc, argv) opstring = mfs ? "NT:a:b:c:d:e:f:i:m:o:s:" : "NOS:T:a:b:c:d:e:f:i:k:l:m:n:o:p:r:s:t:u:x:z:"; - while ((ch = getopt(argc, argv, opstring)) != EOF) { + while ((ch = getopt(argc, argv, opstring)) != -1) { switch (ch) { case 'N': Nflag = 1; diff --git a/sbin/newfs_msdos/newfs_msdos.c b/sbin/newfs_msdos/newfs_msdos.c index 11fc9e46874..5004b8650b5 100644 --- a/sbin/newfs_msdos/newfs_msdos.c +++ b/sbin/newfs_msdos/newfs_msdos.c @@ -1,4 +1,4 @@ -/* $OpenBSD: newfs_msdos.c,v 1.3 1997/01/10 19:04:10 kstailey Exp $ */ +/* $OpenBSD: newfs_msdos.c,v 1.4 1997/01/15 23:41:32 millert Exp $ */ /* * Copyright (c) 1995, 1996 Joerg Wunsch @@ -205,7 +205,7 @@ main(argc, argv) int c, i, fd, format = 0, rootdirsize; char *rdev; - while ((c = getopt(argc, argv, "s:L:t:")) != EOF) + while ((c = getopt(argc, argv, "s:L:t:")) != -1) switch (c) { case 's': format = atoi(optarg); diff --git a/sbin/newlfs/newfs.c b/sbin/newlfs/newfs.c index 6d283ab3446..5adb25e1a47 100644 --- a/sbin/newlfs/newfs.c +++ b/sbin/newlfs/newfs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: newfs.c,v 1.5 1996/12/04 08:39:31 deraadt Exp $ */ +/* $OpenBSD: newfs.c,v 1.6 1997/01/15 23:41:33 millert Exp $ */ /* $NetBSD: newfs.c,v 1.5 1996/05/16 07:17:50 thorpej Exp $ */ /*- @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)newfs.c 8.5 (Berkeley) 5/24/95"; #else -static char rcsid[] = "$OpenBSD: newfs.c,v 1.5 1996/12/04 08:39:31 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: newfs.c,v 1.6 1997/01/15 23:41:33 millert Exp $"; #endif #endif /* not lint */ @@ -156,7 +156,7 @@ main(argc, argv) opstring += 2; debug = lfs = segsize = 0; - while ((ch = getopt(argc, argv, opstring)) != EOF) + while ((ch = getopt(argc, argv, opstring)) != -1) switch(ch) { case 'B': /* LFS segment size */ if ((segsize = atoi(optarg)) < LFS_MINSEGSIZE) diff --git a/sbin/nfsd/nfsd.c b/sbin/nfsd/nfsd.c index 2bc527b51b4..93b3cefacea 100644 --- a/sbin/nfsd/nfsd.c +++ b/sbin/nfsd/nfsd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfsd.c,v 1.3 1996/09/16 20:41:28 deraadt Exp $ */ +/* $OpenBSD: nfsd.c,v 1.4 1997/01/15 23:41:34 millert Exp $ */ /* $NetBSD: nfsd.c,v 1.19 1996/02/18 23:18:56 mycroft Exp $ */ /* @@ -167,7 +167,7 @@ main(argc, argv, envp) #define GETOPT "n:rtu" #define USAGE "[-rtu] [-n num_servers]" #endif - while ((ch = getopt(argc, argv, GETOPT)) != EOF) + while ((ch = getopt(argc, argv, GETOPT)) != -1) switch (ch) { case 'n': nfsdcnt = atoi(optarg); diff --git a/sbin/nfsiod/nfsiod.c b/sbin/nfsiod/nfsiod.c index d647d6b363a..ee596a50641 100644 --- a/sbin/nfsiod/nfsiod.c +++ b/sbin/nfsiod/nfsiod.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfsiod.c,v 1.3 1996/08/02 11:05:09 deraadt Exp $ */ +/* $OpenBSD: nfsiod.c,v 1.4 1997/01/15 23:41:35 millert Exp $ */ /* $NetBSD: nfsiod.c,v 1.12 1996/02/20 16:06:55 fvdl Exp $ */ /* @@ -97,7 +97,7 @@ main(argc, argv) #define MAXNFSDCNT 20 #define DEFNFSDCNT 1 num_servers = DEFNFSDCNT; - while ((ch = getopt(argc, argv, "n:")) != EOF) + while ((ch = getopt(argc, argv, "n:")) != -1) switch (ch) { case 'n': num_servers = atoi(optarg); diff --git a/sbin/ping/ping.c b/sbin/ping/ping.c index c60f7b9c4f2..330326d126a 100644 --- a/sbin/ping/ping.c +++ b/sbin/ping/ping.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ping.c,v 1.12 1996/12/22 03:00:52 deraadt Exp $ */ +/* $OpenBSD: ping.c,v 1.13 1997/01/15 23:41:36 millert Exp $ */ /* $NetBSD: ping.c,v 1.20 1995/08/11 22:37:58 cgd Exp $ */ /* @@ -47,7 +47,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)ping.c 8.1 (Berkeley) 6/5/93"; #else -static char rcsid[] = "$OpenBSD: ping.c,v 1.12 1996/12/22 03:00:52 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: ping.c,v 1.13 1997/01/15 23:41:36 millert Exp $"; #endif #endif /* not lint */ @@ -204,7 +204,7 @@ main(argc, argv) preload = 0; datap = &outpack[8 + sizeof(struct timeval)]; - while ((ch = getopt(argc, argv, "DI:LRS:c:dfh:i:l:np:qrs:T:t:vw:")) != EOF) + while ((ch = getopt(argc, argv, "DI:LRS:c:dfh:i:l:np:qrs:T:t:vw:")) != -1) switch(ch) { case 'c': npackets = strtol(optarg, 0, NULL); diff --git a/sbin/reboot/reboot.c b/sbin/reboot/reboot.c index caf185528f1..1b2fe05b1b3 100644 --- a/sbin/reboot/reboot.c +++ b/sbin/reboot/reboot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: reboot.c,v 1.4 1996/07/22 09:20:59 deraadt Exp $ */ +/* $OpenBSD: reboot.c,v 1.5 1997/01/15 23:41:38 millert 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.4 1996/07/22 09:20:59 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: reboot.c,v 1.5 1997/01/15 23:41:38 millert Exp $"; #endif #endif /* not lint */ @@ -87,7 +87,7 @@ main(argc, argv) } else howto = 0; lflag = nflag = qflag = 0; - while ((ch = getopt(argc, argv, "lnqd")) != EOF) + while ((ch = getopt(argc, argv, "lnqd")) != -1) switch(ch) { case 'l': /* Undocumented; used by shutdown. */ lflag = 1; diff --git a/sbin/restore/main.c b/sbin/restore/main.c index 153411f9092..33ccc60af92 100644 --- a/sbin/restore/main.c +++ b/sbin/restore/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.5 1996/09/16 02:32:34 millert Exp $ */ +/* $OpenBSD: main.c,v 1.6 1997/01/15 23:41:38 millert Exp $ */ /* $NetBSD: main.c,v 1.11 1996/03/15 22:39:39 scottr Exp $ */ /* @@ -102,7 +102,7 @@ main(argc, argv) if ((inputdev = getenv("TAPE")) == NULL) inputdev = _PATH_DEFTAPE; obsolete(&argc, &argv); - while ((ch = getopt(argc, argv, "b:cdf:himNRrs:tvxy")) != EOF) + while ((ch = getopt(argc, argv, "b:cdf:himNRrs:tvxy")) != -1) switch(ch) { case 'b': /* Change default tape blocksize. */ diff --git a/sbin/route/route.c b/sbin/route/route.c index bf64254c18a..52d2755bfb5 100644 --- a/sbin/route/route.c +++ b/sbin/route/route.c @@ -1,4 +1,4 @@ -/* $OpenBSD: route.c,v 1.16 1996/12/22 03:00:53 deraadt Exp $ */ +/* $OpenBSD: route.c,v 1.17 1997/01/15 23:41:40 millert Exp $ */ /* $NetBSD: route.c,v 1.16 1996/04/15 18:27:05 cgd Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)route.c 8.3 (Berkeley) 3/19/94"; #else -static char rcsid[] = "$OpenBSD: route.c,v 1.16 1996/12/22 03:00:53 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: route.c,v 1.17 1997/01/15 23:41:40 millert Exp $"; #endif #endif /* not lint */ @@ -145,7 +145,7 @@ main(argc, argv) if (argc < 2) usage((char *)NULL); - while ((ch = getopt(argc, argv, "nqdtv")) != EOF) + while ((ch = getopt(argc, argv, "nqdtv")) != -1) switch(ch) { case 'n': nflag = 1; diff --git a/sbin/routed/main.c b/sbin/routed/main.c index e1f06adf418..301b60e3d1a 100644 --- a/sbin/routed/main.c +++ b/sbin/routed/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.4 1996/10/02 06:51:45 mickey Exp $ */ +/* $OpenBSD: main.c,v 1.5 1997/01/15 23:41:12 millert Exp $ */ /* * Copyright (c) 1983, 1988, 1993 @@ -39,7 +39,7 @@ char copyright[] = #if !defined(lint) static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/5/93"; #else -static char rcsid[] = "$OpenBSD: main.c,v 1.4 1996/10/02 06:51:45 mickey Exp $"; +static char rcsid[] = "$OpenBSD: main.c,v 1.5 1997/01/15 23:41:12 millert Exp $"; #endif #include "defs.h" @@ -120,7 +120,7 @@ main(int argc, (void)gethostname(myname, sizeof(myname)-1); (void)gethost(myname, &myaddr); - while ((n = getopt(argc, argv, "sqdghmpAtT:F:P:")) != EOF) { + while ((n = getopt(argc, argv, "sqdghmpAtT:F:P:")) != -1) { switch (n) { case 's': supplier = 1; diff --git a/sbin/routed/rtquery/rtquery.c b/sbin/routed/rtquery/rtquery.c index 64fddb212b7..289947ff122 100644 --- a/sbin/routed/rtquery/rtquery.c +++ b/sbin/routed/rtquery/rtquery.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtquery.c,v 1.3 1996/10/02 06:51:49 mickey Exp $ */ +/* $OpenBSD: rtquery.c,v 1.4 1997/01/15 23:41:11 millert Exp $ */ /*- * Copyright (c) 1982, 1986, 1993 @@ -114,7 +114,7 @@ main(int argc, OMSG.rip_nets[0].n_metric = htonl(HOPCNT_INFINITY); pgmname = argv[0]; - while ((ch = getopt(argc, argv, "np1w:r:t:")) != EOF) + while ((ch = getopt(argc, argv, "np1w:r:t:")) != -1) switch (ch) { case 'n': not_trace = 1; diff --git a/sbin/scsi/scsi.c b/sbin/scsi/scsi.c index 8915446f6ab..716a442127e 100644 --- a/sbin/scsi/scsi.c +++ b/sbin/scsi/scsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scsi.c,v 1.1 1996/06/12 11:21:43 deraadt Exp $ */ +/* $OpenBSD: scsi.c,v 1.2 1997/01/15 23:41:41 millert Exp $ */ /* $FreeBSD: scsi.c,v 1.11 1996/04/06 11:00:28 joerg Exp $ */ /* @@ -115,7 +115,7 @@ void procargs(int *argc_p, char ***argv_p) fflag = 0; commandflag = 0; debugflag = 0; - while ((ch = getopt(argc, argv, "ceprvf:d:b:t:l:z:m:P:s:")) != EOF) { + while ((ch = getopt(argc, argv, "ceprvf:d:b:t:l:z:m:P:s:")) != -1) { switch (ch) { #ifdef SCIOCADDR case 'p': diff --git a/sbin/shutdown/shutdown.c b/sbin/shutdown/shutdown.c index 4c78e0c62a6..252282f831c 100644 --- a/sbin/shutdown/shutdown.c +++ b/sbin/shutdown/shutdown.c @@ -1,4 +1,4 @@ -/* $OpenBSD: shutdown.c,v 1.6 1996/12/22 02:59:53 deraadt Exp $ */ +/* $OpenBSD: shutdown.c,v 1.7 1997/01/15 23:41:42 millert 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.6 1996/12/22 02:59:53 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: shutdown.c,v 1.7 1997/01/15 23:41:42 millert Exp $"; #endif #endif /* not lint */ @@ -122,7 +122,7 @@ main(argc, argv) #endif nosync = NULL; readstdin = 0; - while ((ch = getopt(argc, argv, "-fhknr")) != EOF) + while ((ch = getopt(argc, argv, "-fhknr")) != -1) switch (ch) { case '-': readstdin = 1; diff --git a/sbin/swapon/swapon.c b/sbin/swapon/swapon.c index 1513c8e2352..d8e6a936cd7 100644 --- a/sbin/swapon/swapon.c +++ b/sbin/swapon/swapon.c @@ -1,4 +1,4 @@ -/* $OpenBSD: swapon.c,v 1.2 1996/06/23 14:32:46 deraadt Exp $ */ +/* $OpenBSD: swapon.c,v 1.3 1997/01/15 23:41:43 millert Exp $ */ /* $NetBSD: swapon.c,v 1.7 1995/03/18 15:01:18 cgd Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)swapon.c 8.1 (Berkeley) 6/5/93"; #else -static char rcsid[] = "$OpenBSD: swapon.c,v 1.2 1996/06/23 14:32:46 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: swapon.c,v 1.3 1997/01/15 23:41:43 millert Exp $"; #endif #endif /* not lint */ @@ -67,7 +67,7 @@ main(argc, argv) int ch, doall; doall = 0; - while ((ch = getopt(argc, argv, "a")) != EOF) + while ((ch = getopt(argc, argv, "a")) != -1) switch((char)ch) { case 'a': doall = 1; diff --git a/sbin/sysctl/pathconf.c b/sbin/sysctl/pathconf.c index ad51f0dfa75..e597f4d255d 100644 --- a/sbin/sysctl/pathconf.c +++ b/sbin/sysctl/pathconf.c @@ -91,7 +91,7 @@ main(argc, argv) char *path; int ch; - while ((ch = getopt(argc, argv, "Aan")) != EOF) { + while ((ch = getopt(argc, argv, "Aan")) != -1) { switch (ch) { case 'A': diff --git a/sbin/sysctl/sysctl.c b/sbin/sysctl/sysctl.c index d4957d72837..799c15dd686 100644 --- a/sbin/sysctl/sysctl.c +++ b/sbin/sysctl/sysctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sysctl.c,v 1.4 1996/11/25 08:22:43 mickey Exp $ */ +/* $OpenBSD: sysctl.c,v 1.5 1997/01/15 23:44:22 millert 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.1 (Berkeley) 6/6/93"; #else -static char *rcsid = "$OpenBSD: sysctl.c,v 1.4 1996/11/25 08:22:43 mickey Exp $"; +static char *rcsid = "$OpenBSD: sysctl.c,v 1.5 1997/01/15 23:44:22 millert Exp $"; #endif #endif /* not lint */ @@ -143,7 +143,7 @@ main(argc, argv) extern int optind; int ch, lvl1; - while ((ch = getopt(argc, argv, "Aanw")) != EOF) { + while ((ch = getopt(argc, argv, "Aanw")) != -1) { switch (ch) { case 'A': diff --git a/sbin/ttyflags/ttyflags.c b/sbin/ttyflags/ttyflags.c index a4ae8b5ad81..9ea77dcf18b 100644 --- a/sbin/ttyflags/ttyflags.c +++ b/sbin/ttyflags/ttyflags.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ttyflags.c,v 1.5 1996/10/30 08:17:05 tholo Exp $ */ +/* $OpenBSD: ttyflags.c,v 1.6 1997/01/15 23:41:44 millert 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.5 1996/10/30 08:17:05 tholo Exp $"; +static char rcsid[] = "$OpenBSD: ttyflags.c,v 1.6 1997/01/15 23:41:44 millert Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -77,7 +77,7 @@ main(argc, argv) int aflag, ch, rval, pflag = 0; aflag = nflag = vflag = 0; - while ((ch = getopt(argc, argv, "panv")) != EOF) + while ((ch = getopt(argc, argv, "panv")) != -1) switch (ch) { case 'a': aflag = 1; diff --git a/sbin/umount/umount.c b/sbin/umount/umount.c index 86450277255..f3cfeb569ab 100644 --- a/sbin/umount/umount.c +++ b/sbin/umount/umount.c @@ -1,4 +1,4 @@ -/* $OpenBSD: umount.c,v 1.4 1996/06/23 14:32:53 deraadt Exp $ */ +/* $OpenBSD: umount.c,v 1.5 1997/01/15 23:41:45 millert 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.4 1996/06/23 14:32:53 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: umount.c,v 1.5 1997/01/15 23:41:45 millert Exp $"; #endif #endif /* not lint */ @@ -94,7 +94,7 @@ main(argc, argv) sync(); all = 0; - while ((ch = getopt(argc, argv, "aFfh:t:v")) != EOF) + while ((ch = getopt(argc, argv, "aFfh:t:v")) != -1) switch (ch) { case 'a': all = 1; |