aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>1997-03-29 03:33:12 +0000
committerWarner Losh <imp@FreeBSD.org>1997-03-29 03:33:12 +0000
commit8d64695c7c6791641c71b15441665bafc43c2bd0 (patch)
treecf87bbae47f28b546d1ad8e17e84cacc7b425da6
parentf37dd3ba03f77cd17af02a6e72bd8cb089026bce (diff)
downloadsrc-8d64695c7c6791641c71b15441665bafc43c2bd0.tar.gz
src-8d64695c7c6791641c71b15441665bafc43c2bd0.zip
compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
Notes
Notes: svn path=/head/; revision=24359
-rw-r--r--sbin/adjkerntz/adjkerntz.c2
-rw-r--r--sbin/bsdlabel/bsdlabel.c2
-rw-r--r--sbin/disklabel/disklabel.c2
-rw-r--r--sbin/dmesg/dmesg.c4
-rw-r--r--sbin/dset/dset.c2
-rw-r--r--sbin/dumpon/dumpon.c4
-rw-r--r--sbin/i386/mount_msdos/mount_msdos.c4
-rw-r--r--sbin/i386/nextboot/nextboot.c2
-rw-r--r--sbin/ipfw/ipfw.c4
-rw-r--r--sbin/modload/modload.c4
-rw-r--r--sbin/modunload/modunload.c4
-rw-r--r--sbin/mount/mount_ufs.c2
-rw-r--r--sbin/mount_cd9660/mount_cd9660.c4
-rw-r--r--sbin/mount_ext2fs/mount_ext2fs.c4
-rw-r--r--sbin/mount_ifs/mount_ufs.c2
-rw-r--r--sbin/mount_lfs/mount_lfs.c4
-rw-r--r--sbin/mount_msdos/mount_msdos.c4
-rw-r--r--sbin/mount_msdosfs/mount_msdosfs.c4
-rw-r--r--sbin/mount_nfs/mount_nfs.c4
-rw-r--r--sbin/mount_null/mount_null.c4
-rw-r--r--sbin/mount_nullfs/mount_nullfs.c4
-rw-r--r--sbin/mount_portal/mount_portal.c4
-rw-r--r--sbin/mount_portalfs/mount_portalfs.c4
-rw-r--r--sbin/mount_std/mount_std.c4
-rw-r--r--sbin/mount_umap/mount_umap.c4
-rw-r--r--sbin/mount_umapfs/mount_umapfs.c4
-rw-r--r--sbin/mount_union/mount_union.c2
-rw-r--r--sbin/mount_unionfs/mount_unionfs.c2
-rw-r--r--sbin/mountd/mountd.c4
-rw-r--r--sbin/newfs/newfs.c2
-rw-r--r--sbin/newlfs/newfs.c2
-rw-r--r--sbin/nextboot/nextboot.c2
-rw-r--r--sbin/nfsd/nfsd.c2
-rw-r--r--sbin/nfsiod/nfsiod.c2
-rw-r--r--sbin/quotacheck/quotacheck.c2
-rw-r--r--sbin/reboot/reboot.c2
-rw-r--r--sbin/restore/main.c2
-rw-r--r--sbin/routed/main.c2
-rw-r--r--sbin/routed/rtquery/rtquery.c2
-rw-r--r--sbin/savecore/savecore.c2
-rw-r--r--sbin/scsi/scsi.c4
-rw-r--r--sbin/shutdown/shutdown.c2
-rw-r--r--sbin/slattach/slattach.c4
-rw-r--r--sbin/startslip/startslip.c4
-rw-r--r--sbin/swapon/swapon.c2
-rw-r--r--sbin/umount/umount.c2
-rw-r--r--usr.sbin/mount_portalfs/mount_portalfs.c4
-rw-r--r--usr.sbin/mountd/mountd.c4
-rw-r--r--usr.sbin/nfsd/nfsd.c2
49 files changed, 74 insertions, 74 deletions
diff --git a/sbin/adjkerntz/adjkerntz.c b/sbin/adjkerntz/adjkerntz.c
index 8cd3ff9ce750..e8b069018cc2 100644
--- a/sbin/adjkerntz/adjkerntz.c
+++ b/sbin/adjkerntz/adjkerntz.c
@@ -82,7 +82,7 @@ int main(argc, argv)
init = Unknown;
sigset_t mask, emask;
- while ((ch = getopt(argc, argv, "ais")) != EOF)
+ while ((ch = getopt(argc, argv, "ais")) != -1)
switch((char)ch) {
case 'i': /* initial call, save offset */
if (init != Unknown)
diff --git a/sbin/bsdlabel/bsdlabel.c b/sbin/bsdlabel/bsdlabel.c
index 032f601d1b7b..f0b2a8b99272 100644
--- a/sbin/bsdlabel/bsdlabel.c
+++ b/sbin/bsdlabel/bsdlabel.c
@@ -160,7 +160,7 @@ main(argc, argv)
int ch, f, flag, error = 0;
char *name = 0;
- while ((ch = getopt(argc, argv, OPTIONS)) != EOF)
+ while ((ch = getopt(argc, argv, OPTIONS)) != -1)
switch (ch) {
#if NUMBOOT > 0
case 'B':
diff --git a/sbin/disklabel/disklabel.c b/sbin/disklabel/disklabel.c
index 032f601d1b7b..f0b2a8b99272 100644
--- a/sbin/disklabel/disklabel.c
+++ b/sbin/disklabel/disklabel.c
@@ -160,7 +160,7 @@ main(argc, argv)
int ch, f, flag, error = 0;
char *name = 0;
- while ((ch = getopt(argc, argv, OPTIONS)) != EOF)
+ while ((ch = getopt(argc, argv, OPTIONS)) != -1)
switch (ch) {
#if NUMBOOT > 0
case 'B':
diff --git a/sbin/dmesg/dmesg.c b/sbin/dmesg/dmesg.c
index b68a1d9e4eed..2746e356bb03 100644
--- a/sbin/dmesg/dmesg.c
+++ b/sbin/dmesg/dmesg.c
@@ -42,7 +42,7 @@ static const char copyright[] =
static const char sccsid[] = "@(#)dmesg.c 8.1 (Berkeley) 6/5/93";
#endif
static const char rcsid[] =
- "$Id$";
+ "$Id: dmesg.c,v 1.6 1997/02/22 14:32:13 peter Exp $";
#endif /* not lint */
#include <sys/cdefs.h>
@@ -85,7 +85,7 @@ main(argc, argv)
(void) setlocale(LC_CTYPE, "");
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/dset/dset.c b/sbin/dset/dset.c
index 4347797d4891..7905619e9a2d 100644
--- a/sbin/dset/dset.c
+++ b/sbin/dset/dset.c
@@ -114,7 +114,7 @@ main(ac, av)
int testonly = FALSE;
int verbose = FALSE;
- while ((ch = getopt(ac, av, "qtv")) != EOF)
+ while ((ch = getopt(ac, av, "qtv")) != -1)
switch (ch) {
case 'q':
quiet = TRUE;
diff --git a/sbin/dumpon/dumpon.c b/sbin/dumpon/dumpon.c
index 27e7a3d36259..8da85cdb39aa 100644
--- a/sbin/dumpon/dumpon.c
+++ b/sbin/dumpon/dumpon.c
@@ -40,7 +40,7 @@ static char copyright[] =
#ifndef lint
/*static char sccsid[] = "From: @(#)swapon.c 8.1 (Berkeley) 6/5/93";*/
static const char rcsid[] =
- "$Id$";
+ "$Id: dumpon.c,v 1.4 1997/02/22 14:32:22 peter Exp $";
#endif /* not lint */
#include <errno.h>
@@ -68,7 +68,7 @@ main(int argc, char **argv)
verbose = rv = 0;
whoami = argv[0];
- while ((ch = getopt(argc, argv, "v")) != EOF)
+ while ((ch = getopt(argc, argv, "v")) != -1)
switch((char)ch) {
case 'v':
verbose = 1;
diff --git a/sbin/i386/mount_msdos/mount_msdos.c b/sbin/i386/mount_msdos/mount_msdos.c
index dff366b2df62..53ae83b044e4 100644
--- a/sbin/i386/mount_msdos/mount_msdos.c
+++ b/sbin/i386/mount_msdos/mount_msdos.c
@@ -30,7 +30,7 @@
#ifndef lint
static const char rcsid[] =
- "$Id: mount_msdos.c,v 1.7 1997/02/22 14:32:30 peter Exp $";
+ "$Id: mount_msdos.c,v 1.8 1997/03/03 13:23:54 bde Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -75,7 +75,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/i386/nextboot/nextboot.c b/sbin/i386/nextboot/nextboot.c
index 2398b56f0f1b..54618846526d 100644
--- a/sbin/i386/nextboot/nextboot.c
+++ b/sbin/i386/nextboot/nextboot.c
@@ -66,7 +66,7 @@ main (int argc, char** argv)
int part;
bflag = 0;
- while ((ch = getopt(argc, argv, "bde")) != EOF) {
+ while ((ch = getopt(argc, argv, "bde")) != -1) {
switch(ch) {
case 'b':
bflag = 1;
diff --git a/sbin/ipfw/ipfw.c b/sbin/ipfw/ipfw.c
index e321a8b38d7c..12547214c0fc 100644
--- a/sbin/ipfw/ipfw.c
+++ b/sbin/ipfw/ipfw.c
@@ -16,7 +16,7 @@
*
* NEW command line interface for IP firewall facility
*
- * $Id: ipfw.c,v 1.40 1997/02/22 14:32:36 peter Exp $
+ * $Id: ipfw.c,v 1.41 1997/03/05 12:08:44 bde Exp $
*
*/
@@ -856,7 +856,7 @@ ipfw_main(ac,av)
/* Set the force flag for non-interactive processes */
do_force = !isatty(STDIN_FILENO);
- while ((ch = getopt(ac, av ,"afqtN")) != EOF)
+ while ((ch = getopt(ac, av ,"afqtN")) != -1)
switch(ch) {
case 'a':
do_acct=1;
diff --git a/sbin/modload/modload.c b/sbin/modload/modload.c
index 68da1aba4b04..58287091ee6d 100644
--- a/sbin/modload/modload.c
+++ b/sbin/modload/modload.c
@@ -29,7 +29,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: modload.c,v 1.16 1997/02/22 14:32:40 peter Exp $
+ * $Id: modload.c,v 1.17 1997/03/11 12:23:09 peter Exp $
*/
#include <stdio.h>
@@ -172,7 +172,7 @@ main(argc, argv)
int sz, bytesleft;
char buf[MODIOBUF];
- while ((c = getopt(argc, argv, "dvquA:e:p:o:")) != EOF) {
+ while ((c = getopt(argc, argv, "dvquA:e:p:o:")) != -1) {
switch (c) {
case 'd':
debug = 1;
diff --git a/sbin/modunload/modunload.c b/sbin/modunload/modunload.c
index b6bbdf5c7e34..4c3b185cc4e7 100644
--- a/sbin/modunload/modunload.c
+++ b/sbin/modunload/modunload.c
@@ -29,7 +29,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: modunload.c,v 1.4 1997/02/22 14:32:42 peter Exp $
+ * $Id: modunload.c,v 1.5 1997/03/11 12:24:00 peter Exp $
*/
#include <stdio.h>
@@ -74,7 +74,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_ufs.c b/sbin/mount/mount_ufs.c
index c12cccf1840d..b6344d125963 100644
--- a/sbin/mount/mount_ufs.c
+++ b/sbin/mount/mount_ufs.c
@@ -81,7 +81,7 @@ mount_ufs(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, 0);
diff --git a/sbin/mount_cd9660/mount_cd9660.c b/sbin/mount_cd9660/mount_cd9660.c
index 9434f3c0a9fb..23ccd0ea5b63 100644
--- a/sbin/mount_cd9660/mount_cd9660.c
+++ b/sbin/mount_cd9660/mount_cd9660.c
@@ -49,7 +49,7 @@ static char copyright[] =
static char sccsid[] = "@(#)mount_cd9660.c 8.7 (Berkeley) 5/1/95";
*/
static const char rcsid[] =
- "$Id: mount_cd9660.c,v 1.9 1997/02/22 14:32:44 peter Exp $";
+ "$Id: mount_cd9660.c,v 1.10 1997/03/11 12:29:02 peter Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -88,7 +88,7 @@ main(argc, argv)
int error;
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 8f3be49f38c6..4eb41a31d081 100644
--- a/sbin/mount_ext2fs/mount_ext2fs.c
+++ b/sbin/mount_ext2fs/mount_ext2fs.c
@@ -42,7 +42,7 @@ static char copyright[] =
static char sccsid[] = "@(#)mount_lfs.c 8.3 (Berkeley) 3/27/94";
*/
static const char rcsid[] =
- "$Id: mount_ext2fs.c,v 1.6 1997/02/22 14:32:45 peter Exp $";
+ "$Id: mount_ext2fs.c,v 1.7 1997/03/11 12:29:51 peter Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -80,7 +80,7 @@ main(argc, argv)
options = NULL;
mntflags = 0;
- while ((ch = getopt(argc, argv, "o:")) != EOF)
+ while ((ch = getopt(argc, argv, "o:")) != -1)
switch (ch) {
case 'o':
getmntopts(optarg, mopts, &mntflags, 0);
diff --git a/sbin/mount_ifs/mount_ufs.c b/sbin/mount_ifs/mount_ufs.c
index c12cccf1840d..b6344d125963 100644
--- a/sbin/mount_ifs/mount_ufs.c
+++ b/sbin/mount_ifs/mount_ufs.c
@@ -81,7 +81,7 @@ mount_ufs(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, 0);
diff --git a/sbin/mount_lfs/mount_lfs.c b/sbin/mount_lfs/mount_lfs.c
index 0ea35df2301b..607d7a4cf7c2 100644
--- a/sbin/mount_lfs/mount_lfs.c
+++ b/sbin/mount_lfs/mount_lfs.c
@@ -42,7 +42,7 @@ static char copyright[] =
static char sccsid[] = "@(#)mount_lfs.c 8.4 (Berkeley) 4/26/95";
*/
static const char rcsid[] =
- "$Id: mount_lfs.c,v 1.7 1997/02/22 14:32:46 peter Exp $";
+ "$Id: mount_lfs.c,v 1.8 1997/03/11 12:30:33 peter Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -83,7 +83,7 @@ main(argc, argv)
options = NULL;
mntflags = noclean = short_rds = cleaner_debug = 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 dff366b2df62..53ae83b044e4 100644
--- a/sbin/mount_msdos/mount_msdos.c
+++ b/sbin/mount_msdos/mount_msdos.c
@@ -30,7 +30,7 @@
#ifndef lint
static const char rcsid[] =
- "$Id: mount_msdos.c,v 1.7 1997/02/22 14:32:30 peter Exp $";
+ "$Id: mount_msdos.c,v 1.8 1997/03/03 13:23:54 bde Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -75,7 +75,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_msdosfs/mount_msdosfs.c b/sbin/mount_msdosfs/mount_msdosfs.c
index dff366b2df62..53ae83b044e4 100644
--- a/sbin/mount_msdosfs/mount_msdosfs.c
+++ b/sbin/mount_msdosfs/mount_msdosfs.c
@@ -30,7 +30,7 @@
#ifndef lint
static const char rcsid[] =
- "$Id: mount_msdos.c,v 1.7 1997/02/22 14:32:30 peter Exp $";
+ "$Id: mount_msdos.c,v 1.8 1997/03/03 13:23:54 bde Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -75,7 +75,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_nfs/mount_nfs.c b/sbin/mount_nfs/mount_nfs.c
index 31061c02a34b..1a3dd1046379 100644
--- a/sbin/mount_nfs/mount_nfs.c
+++ b/sbin/mount_nfs/mount_nfs.c
@@ -45,7 +45,7 @@ static char copyright[] =
static char sccsid[] = "@(#)mount_nfs.c 8.11 (Berkeley) 5/4/95";
*/
static const char rcsid[] =
- "$Id: mount_nfs.c,v 1.16 1997/02/22 14:32:48 peter Exp $";
+ "$Id: mount_nfs.c,v 1.17 1997/03/11 12:31:56 peter Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -223,7 +223,7 @@ main(argc, argv)
nfsargs = nfsdefargs;
nfsargsp = &nfsargs;
while ((c = getopt(argc, argv,
- "3a:bcdD:g:I:iKL:lm:o:PpqR:r:sTt:w:x:U")) != EOF)
+ "3a:bcdD:g:I:iKL:lm:o:PpqR:r:sTt:w:x:U")) != -1)
switch (c) {
case '3':
nfsargsp->flags |= NFSMNT_NFSV3;
diff --git a/sbin/mount_null/mount_null.c b/sbin/mount_null/mount_null.c
index 9269a718e0e8..6c447ece0598 100644
--- a/sbin/mount_null/mount_null.c
+++ b/sbin/mount_null/mount_null.c
@@ -45,7 +45,7 @@ char copyright[] =
static char sccsid[] = "@(#)mount_null.c 8.6 (Berkeley) 4/26/95";
*/
static const char rcsid[] =
- "$Id: mount_null.c,v 1.7 1997/02/22 14:32:51 peter Exp $";
+ "$Id: mount_null.c,v 1.8 1997/03/11 12:33:36 peter Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -81,7 +81,7 @@ main(argc, argv)
int error;
mntflags = 0;
- while ((ch = getopt(argc, argv, "o:")) != EOF)
+ while ((ch = getopt(argc, argv, "o:")) != -1)
switch(ch) {
case 'o':
getmntopts(optarg, mopts, &mntflags, 0);
diff --git a/sbin/mount_nullfs/mount_nullfs.c b/sbin/mount_nullfs/mount_nullfs.c
index 9269a718e0e8..6c447ece0598 100644
--- a/sbin/mount_nullfs/mount_nullfs.c
+++ b/sbin/mount_nullfs/mount_nullfs.c
@@ -45,7 +45,7 @@ char copyright[] =
static char sccsid[] = "@(#)mount_null.c 8.6 (Berkeley) 4/26/95";
*/
static const char rcsid[] =
- "$Id: mount_null.c,v 1.7 1997/02/22 14:32:51 peter Exp $";
+ "$Id: mount_null.c,v 1.8 1997/03/11 12:33:36 peter Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -81,7 +81,7 @@ main(argc, argv)
int error;
mntflags = 0;
- while ((ch = getopt(argc, argv, "o:")) != EOF)
+ while ((ch = getopt(argc, argv, "o:")) != -1)
switch(ch) {
case 'o':
getmntopts(optarg, mopts, &mntflags, 0);
diff --git a/sbin/mount_portal/mount_portal.c b/sbin/mount_portal/mount_portal.c
index cd8d72b58bbf..4f489ed945ad 100644
--- a/sbin/mount_portal/mount_portal.c
+++ b/sbin/mount_portal/mount_portal.c
@@ -45,7 +45,7 @@ char copyright[] =
static char sccsid[] = "@(#)mount_portal.c 8.6 (Berkeley) 4/26/95";
*/
static const char rcsid[] =
- "$Id: mount_portal.c,v 1.10 1997/03/11 12:34:58 peter Exp $";
+ "$Id: mount_portal.c,v 1.11 1997/03/24 05:53:12 imp Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -122,7 +122,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, 0);
diff --git a/sbin/mount_portalfs/mount_portalfs.c b/sbin/mount_portalfs/mount_portalfs.c
index cd8d72b58bbf..4f489ed945ad 100644
--- a/sbin/mount_portalfs/mount_portalfs.c
+++ b/sbin/mount_portalfs/mount_portalfs.c
@@ -45,7 +45,7 @@ char copyright[] =
static char sccsid[] = "@(#)mount_portal.c 8.6 (Berkeley) 4/26/95";
*/
static const char rcsid[] =
- "$Id: mount_portal.c,v 1.10 1997/03/11 12:34:58 peter Exp $";
+ "$Id: mount_portal.c,v 1.11 1997/03/24 05:53:12 imp Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -122,7 +122,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, 0);
diff --git a/sbin/mount_std/mount_std.c b/sbin/mount_std/mount_std.c
index 584605ef7130..e85f4b3384b5 100644
--- a/sbin/mount_std/mount_std.c
+++ b/sbin/mount_std/mount_std.c
@@ -43,7 +43,7 @@ char copyright[] =
#ifndef lint
static const char rcsid[] =
- "$Id: mount_std.c,v 1.5 1997/02/22 14:32:59 peter Exp $";
+ "$Id: mount_std.c,v 1.6 1997/03/11 12:38:16 peter Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -92,7 +92,7 @@ main(argc, argv)
}
mntflags = 0;
- while ((ch = getopt(argc, argv, "o:")) != EOF)
+ while ((ch = getopt(argc, argv, "o:")) != -1)
switch (ch) {
case 'o':
getmntopts(optarg, mopts, &mntflags, 0);
diff --git a/sbin/mount_umap/mount_umap.c b/sbin/mount_umap/mount_umap.c
index 9872395eca13..263c8d3d5222 100644
--- a/sbin/mount_umap/mount_umap.c
+++ b/sbin/mount_umap/mount_umap.c
@@ -45,7 +45,7 @@ char copyright[] =
static char sccsid[] = "@(#)mount_umap.c 8.5 (Berkeley) 4/26/95";
*/
static const char rcsid[] =
- "$Id: mount_umap.c,v 1.9 1997/02/22 14:33:00 peter Exp $";
+ "$Id: mount_umap.c,v 1.10 1997/03/11 12:39:32 peter Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -105,7 +105,7 @@ main(argc, argv)
mntflags = 0;
mapfile = 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_umapfs/mount_umapfs.c b/sbin/mount_umapfs/mount_umapfs.c
index 9872395eca13..263c8d3d5222 100644
--- a/sbin/mount_umapfs/mount_umapfs.c
+++ b/sbin/mount_umapfs/mount_umapfs.c
@@ -45,7 +45,7 @@ char copyright[] =
static char sccsid[] = "@(#)mount_umap.c 8.5 (Berkeley) 4/26/95";
*/
static const char rcsid[] =
- "$Id: mount_umap.c,v 1.9 1997/02/22 14:33:00 peter Exp $";
+ "$Id: mount_umap.c,v 1.10 1997/03/11 12:39:32 peter Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -105,7 +105,7 @@ main(argc, argv)
mntflags = 0;
mapfile = 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 cb5e406b6adb..e2acac97df4f 100644
--- a/sbin/mount_union/mount_union.c
+++ b/sbin/mount_union/mount_union.c
@@ -79,7 +79,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/mount_unionfs/mount_unionfs.c b/sbin/mount_unionfs/mount_unionfs.c
index cb5e406b6adb..e2acac97df4f 100644
--- a/sbin/mount_unionfs/mount_unionfs.c
+++ b/sbin/mount_unionfs/mount_unionfs.c
@@ -79,7 +79,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 8039be821ad4..aef2583fe19b 100644
--- a/sbin/mountd/mountd.c
+++ b/sbin/mountd/mountd.c
@@ -43,7 +43,7 @@ static char copyright[] =
#ifndef lint
/*static char sccsid[] = "@(#)mountd.c 8.15 (Berkeley) 5/1/95"; */
static const char rcsid[] =
- "$Id: mountd.c,v 1.14 1997/03/11 12:43:45 peter Exp $";
+ "$Id: mountd.c,v 1.15 1997/03/27 20:00:48 guido Exp $";
#endif /*not lint*/
#include <sys/param.h>
@@ -270,7 +270,7 @@ main(argc, argv)
errx(1, "NFS support is not available in the running kernel");
#endif /* __FreeBSD__ */
- while ((c = getopt(argc, argv, "dnr")) != EOF)
+ while ((c = getopt(argc, argv, "dnr")) != -1)
switch (c) {
case 'n':
resvport_only = 0;
diff --git a/sbin/newfs/newfs.c b/sbin/newfs/newfs.c
index 7c2fe7669fb9..71a3dfd14ea2 100644
--- a/sbin/newfs/newfs.c
+++ b/sbin/newfs/newfs.c
@@ -235,7 +235,7 @@ main(argc, argv)
opstring = mfs ?
"NF:T: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:";
- while ((ch = getopt(argc, argv, opstring)) != EOF)
+ while ((ch = getopt(argc, argv, opstring)) != -1)
switch (ch) {
case 'N':
Nflag = 1;
diff --git a/sbin/newlfs/newfs.c b/sbin/newlfs/newfs.c
index 953c95850ab2..8d7b62b73bb8 100644
--- a/sbin/newlfs/newfs.c
+++ b/sbin/newlfs/newfs.c
@@ -143,7 +143,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/nextboot/nextboot.c b/sbin/nextboot/nextboot.c
index 2398b56f0f1b..54618846526d 100644
--- a/sbin/nextboot/nextboot.c
+++ b/sbin/nextboot/nextboot.c
@@ -66,7 +66,7 @@ main (int argc, char** argv)
int part;
bflag = 0;
- while ((ch = getopt(argc, argv, "bde")) != EOF) {
+ while ((ch = getopt(argc, argv, "bde")) != -1) {
switch(ch) {
case 'b':
bflag = 1;
diff --git a/sbin/nfsd/nfsd.c b/sbin/nfsd/nfsd.c
index 1d4fdf0afb1b..399b12e85968 100644
--- a/sbin/nfsd/nfsd.c
+++ b/sbin/nfsd/nfsd.c
@@ -194,7 +194,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 82443711dbfd..e2479fe2ed55 100644
--- a/sbin/nfsiod/nfsiod.c
+++ b/sbin/nfsiod/nfsiod.c
@@ -102,7 +102,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/quotacheck/quotacheck.c b/sbin/quotacheck/quotacheck.c
index 4ca71c528c05..5e0d067ceeda 100644
--- a/sbin/quotacheck/quotacheck.c
+++ b/sbin/quotacheck/quotacheck.c
@@ -136,7 +136,7 @@ main(argc, argv)
char ch, *name;
errs = maxrun = 0;
- while ((ch = getopt(argc, argv, "aguvl:")) != EOF) {
+ while ((ch = getopt(argc, argv, "aguvl:")) != -1) {
switch(ch) {
case 'a':
aflag++;
diff --git a/sbin/reboot/reboot.c b/sbin/reboot/reboot.c
index 66e539830674..a103a320eef4 100644
--- a/sbin/reboot/reboot.c
+++ b/sbin/reboot/reboot.c
@@ -72,7 +72,7 @@ main(argc, argv)
} else
howto = 0;
lflag = nflag = qflag = 0;
- while ((ch = getopt(argc, argv, "lnpq")) != EOF)
+ while ((ch = getopt(argc, argv, "lnpq")) != -1)
switch(ch) {
case 'l': /* Undocumented; used by shutdown. */
lflag = 1;
diff --git a/sbin/restore/main.c b/sbin/restore/main.c
index b61bbc03cc5e..dbb895b1afd2 100644
--- a/sbin/restore/main.c
+++ b/sbin/restore/main.c
@@ -96,7 +96,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/routed/main.c b/sbin/routed/main.c
index 36399e999a70..327ffdf8acdb 100644
--- a/sbin/routed/main.c
+++ b/sbin/routed/main.c
@@ -123,7 +123,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 bddf590f479a..18c1b1a01d2a 100644
--- a/sbin/routed/rtquery/rtquery.c
+++ b/sbin/routed/rtquery/rtquery.c
@@ -118,7 +118,7 @@ main(int argc,
OMSG.rip_nets[0].n_metric = htonl(HOPCNT_INFINITY);
pgmname = argv[0];
- while ((ch = getopt(argc, argv, "np1w:r:t:a:")) != EOF)
+ while ((ch = getopt(argc, argv, "np1w:r:t:a:")) != -1)
switch (ch) {
case 'n':
not_trace = 1;
diff --git a/sbin/savecore/savecore.c b/sbin/savecore/savecore.c
index 760835a41913..d78a55a478e6 100644
--- a/sbin/savecore/savecore.c
+++ b/sbin/savecore/savecore.c
@@ -139,7 +139,7 @@ main(argc, argv)
openlog("savecore", LOG_PERROR, LOG_DAEMON);
- while ((ch = getopt(argc, argv, "cdfN:vz")) != EOF)
+ while ((ch = getopt(argc, argv, "cdfN:vz")) != -1)
switch(ch) {
case 'c':
clear = 1;
diff --git a/sbin/scsi/scsi.c b/sbin/scsi/scsi.c
index 60ccb72f9866..fbd8c6f9e151 100644
--- a/sbin/scsi/scsi.c
+++ b/sbin/scsi/scsi.c
@@ -39,7 +39,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: scsi.c,v 1.14 1997/02/22 14:33:16 peter Exp $
*/
#include <stdio.h>
@@ -108,7 +108,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) {
case 'p':
probe_all = 1;
diff --git a/sbin/shutdown/shutdown.c b/sbin/shutdown/shutdown.c
index 2a915c3c2642..8a66ab9003dc 100644
--- a/sbin/shutdown/shutdown.c
+++ b/sbin/shutdown/shutdown.c
@@ -111,7 +111,7 @@ main(argc, argv)
#endif
nosync = NULL;
readstdin = 0;
- while ((ch = getopt(argc, argv, "-hknr")) != EOF)
+ while ((ch = getopt(argc, argv, "-hknr")) != -1)
switch (ch) {
case '-':
readstdin = 1;
diff --git a/sbin/slattach/slattach.c b/sbin/slattach/slattach.c
index 39bd3a6d32ea..ab38ffb75a96 100644
--- a/sbin/slattach/slattach.c
+++ b/sbin/slattach/slattach.c
@@ -42,7 +42,7 @@ static char copyright[] =
#ifndef lint
/*static char sccsid[] = "from: @(#)slattach.c 4.6 (Berkeley) 6/1/90";*/
-static char rcsid[] = "$Id$";
+static char rcsid[] = "$Id: slattach.c,v 1.25 1997/02/22 14:33:19 peter Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -132,7 +132,7 @@ int main(int argc, char **argv)
extern char *optarg;
extern int optind;
- while ((option = getopt(argc, argv, "ace:fhlnr:s:u:zLK:O:S:")) != EOF) {
+ while ((option = getopt(argc, argv, "ace:fhlnr:s:u:zLK:O:S:")) != -1) {
switch (option) {
case 'a':
slflags |= IFF_LINK2;
diff --git a/sbin/startslip/startslip.c b/sbin/startslip/startslip.c
index 603d7db2596c..90d928c39ac5 100644
--- a/sbin/startslip/startslip.c
+++ b/sbin/startslip/startslip.c
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: startslip.c,v 1.22 1997/02/22 14:33:20 peter Exp $
*/
#ifndef lint
@@ -128,7 +128,7 @@ main(argc, argv)
pid_t pid;
struct termios t;
- while ((ch = getopt(argc, argv, "dhlb:s:t:w:A:U:D:W:K:O:S:L")) != EOF)
+ while ((ch = getopt(argc, argv, "dhlb:s:t:w:A:U:D:W:K:O:S:L")) != -1)
switch (ch) {
case 'd':
debug = 1;
diff --git a/sbin/swapon/swapon.c b/sbin/swapon/swapon.c
index 2a07b534f009..d2eebed4b8e1 100644
--- a/sbin/swapon/swapon.c
+++ b/sbin/swapon/swapon.c
@@ -60,7 +60,7 @@ main(int argc, char **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/umount/umount.c b/sbin/umount/umount.c
index ad64d5321a24..8945a66c62f9 100644
--- a/sbin/umount/umount.c
+++ b/sbin/umount/umount.c
@@ -87,7 +87,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;
diff --git a/usr.sbin/mount_portalfs/mount_portalfs.c b/usr.sbin/mount_portalfs/mount_portalfs.c
index cd8d72b58bbf..4f489ed945ad 100644
--- a/usr.sbin/mount_portalfs/mount_portalfs.c
+++ b/usr.sbin/mount_portalfs/mount_portalfs.c
@@ -45,7 +45,7 @@ char copyright[] =
static char sccsid[] = "@(#)mount_portal.c 8.6 (Berkeley) 4/26/95";
*/
static const char rcsid[] =
- "$Id: mount_portal.c,v 1.10 1997/03/11 12:34:58 peter Exp $";
+ "$Id: mount_portal.c,v 1.11 1997/03/24 05:53:12 imp Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -122,7 +122,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, 0);
diff --git a/usr.sbin/mountd/mountd.c b/usr.sbin/mountd/mountd.c
index 8039be821ad4..aef2583fe19b 100644
--- a/usr.sbin/mountd/mountd.c
+++ b/usr.sbin/mountd/mountd.c
@@ -43,7 +43,7 @@ static char copyright[] =
#ifndef lint
/*static char sccsid[] = "@(#)mountd.c 8.15 (Berkeley) 5/1/95"; */
static const char rcsid[] =
- "$Id: mountd.c,v 1.14 1997/03/11 12:43:45 peter Exp $";
+ "$Id: mountd.c,v 1.15 1997/03/27 20:00:48 guido Exp $";
#endif /*not lint*/
#include <sys/param.h>
@@ -270,7 +270,7 @@ main(argc, argv)
errx(1, "NFS support is not available in the running kernel");
#endif /* __FreeBSD__ */
- while ((c = getopt(argc, argv, "dnr")) != EOF)
+ while ((c = getopt(argc, argv, "dnr")) != -1)
switch (c) {
case 'n':
resvport_only = 0;
diff --git a/usr.sbin/nfsd/nfsd.c b/usr.sbin/nfsd/nfsd.c
index 1d4fdf0afb1b..399b12e85968 100644
--- a/usr.sbin/nfsd/nfsd.c
+++ b/usr.sbin/nfsd/nfsd.c
@@ -194,7 +194,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);