diff options
| author | lukem <lukem@NetBSD.org> | 1997-09-15 06:02:20 +0000 |
|---|---|---|
| committer | lukem <lukem@NetBSD.org> | 1997-09-15 06:02:20 +0000 |
| commit | f78681534b02c6c85d6f9418147847df67c7213e (patch) | |
| tree | 6c2bfef64fe80f97897b9fcfc0ddc7ad423b4d01 /sbin/mount_procfs | |
| parent | 4eb9f40a9c4531697f5fa370f29661d9ee7a3813 (diff) | |
* update for WARNS=1
* getopt returns -1 not EOF
* fix .Nm usage
Diffstat (limited to 'sbin/mount_procfs')
| -rw-r--r-- | sbin/mount_procfs/mount_procfs.8 | 8 | ||||
| -rw-r--r-- | sbin/mount_procfs/mount_procfs.c | 15 |
2 files changed, 12 insertions, 11 deletions
diff --git a/sbin/mount_procfs/mount_procfs.8 b/sbin/mount_procfs/mount_procfs.8 index be22b1cc156..4127d72efa1 100644 --- a/sbin/mount_procfs/mount_procfs.8 +++ b/sbin/mount_procfs/mount_procfs.8 @@ -1,4 +1,4 @@ -.\" $NetBSD: mount_procfs.8,v 1.8 1997/05/13 04:15:07 mikel Exp $ +.\" $NetBSD: mount_procfs.8,v 1.9 1997/09/15 06:02:20 lukem Exp $ .\" .\" Copyright (c) 1992, 1993 .\" The Regents of the University of California. All rights reserved. @@ -44,13 +44,13 @@ .Nm mount_procfs .Nd mount the process file system .Sh SYNOPSIS -.Nm mount_procfs +.Nm .Op Fl o Ar options .Pa /proc .Pa mount_point .Sh DESCRIPTION The -.Nm mount_procfs +.Nm command attaches an instance of the process namespace to the global filesystem namespace. The conventional mount point is @@ -234,5 +234,5 @@ since most of the functionality of requires that state be maintained. .Sh HISTORY The -.Nm mount_procfs +.Nm utility first appeared in 4.4BSD. diff --git a/sbin/mount_procfs/mount_procfs.c b/sbin/mount_procfs/mount_procfs.c index 777e93f57c5..a7add82d9bb 100644 --- a/sbin/mount_procfs/mount_procfs.c +++ b/sbin/mount_procfs/mount_procfs.c @@ -1,4 +1,4 @@ -/* $NetBSD: mount_procfs.c,v 1.7 1996/04/13 01:31:59 jtc Exp $ */ +/* $NetBSD: mount_procfs.c,v 1.8 1997/09/15 06:02:22 lukem Exp $ */ /* * Copyright (c) 1990, 1992, 1993 Jan-Simon Pendry @@ -37,17 +37,17 @@ * SUCH DAMAGE. */ +#include <sys/cdefs.h> #ifndef lint -char copyright[] = -"@(#) Copyright (c) 1992, 1993, 1994\n\ - The Regents of the University of California. All rights reserved.\n"; +__COPYRIGHT("@(#) Copyright (c) 1992, 1993, 1994\n\ + The Regents of the University of California. All rights reserved.\n"); #endif /* not lint */ #ifndef lint #if 0 static char sccsid[] = "@(#)mount_procfs.c 8.3 (Berkeley) 3/27/94"; #else -static char rcsid[] = "$NetBSD: mount_procfs.c,v 1.7 1996/04/13 01:31:59 jtc Exp $"; +__RCSID("$NetBSD: mount_procfs.c,v 1.8 1997/09/15 06:02:22 lukem Exp $"); #endif #endif /* not lint */ @@ -67,6 +67,7 @@ const struct mntopt mopts[] = { { NULL } }; +int main __P((int, char *[])); void usage __P((void)); int @@ -77,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); @@ -93,7 +94,7 @@ main(argc, argv) usage(); if (mount(MOUNT_PROCFS, argv[1], mntflags, NULL)) - err(1, NULL); + err(1, "%s", ""); exit(0); } |
