summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>1997-03-29 03:33:12 +0000
committerimp <imp@FreeBSD.org>1997-03-29 03:33:12 +0000
commit167db5291223948e17d74470feff53f15777fcaf (patch)
tree01c0debb3ff124595890fe1408caea5024debc1f
parentacc1b708c198fcaff62c716caea359a1cc7eb9d0 (diff)
downloadFreeBSD-src-167db5291223948e17d74470feff53f15777fcaf.zip
FreeBSD-src-167db5291223948e17d74470feff53f15777fcaf.tar.gz
compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
-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 8cd3ff9..e8b0690 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 032f601..f0b2a8b 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 032f601..f0b2a8b 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 b68a1d9..2746e35 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 4347797..7905619 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 27e7a3d..8da85cd 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 dff366b..53ae83b 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 2398b56..5461884 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 e321a8b..1254721 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 68da1ab..5828709 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 b6bbdf5..4c3b185 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 c12cccf..b6344d1 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 9434f3c..23ccd0e 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 8f3be49..4eb41a3 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 c12cccf..b6344d1 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 0ea35df..607d7a4 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 dff366b..53ae83b 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 dff366b..53ae83b 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 31061c0..1a3dd10 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 9269a71..6c447ec 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 9269a71..6c447ec 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 cd8d72b..4f489ed 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 cd8d72b..4f489ed 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 584605e..e85f4b3 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 9872395..263c8d3 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 9872395..263c8d3 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 cb5e406..e2acac9 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 cb5e406..e2acac9 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 8039be8..aef2583 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 7c2fe76..71a3dfd 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 953c958..8d7b62b 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 2398b56..5461884 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 1d4fdf0..399b12e 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 82443711..e2479fe 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 4ca71c5..5e0d067 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 66e5398..a103a32 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 b61bbc0..dbb895b 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 36399e9..327ffdf 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 bddf590..18c1b1a 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 760835a..d78a55a 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 60ccb72..fbd8c6f 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 2a915c3..8a66ab9 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 39bd3a6..ab38ffb 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 603d7db..90d928c 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 2a07b53..d2eebed 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 ad64d53..8945a66 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 cd8d72b..4f489ed 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 8039be8..aef2583 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 1d4fdf0..399b12e 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);
OpenPOWER on IntegriCloud