* update for WARNS=1
* getopt returns -1 not EOF * fix .Nm usage
This commit is contained in:
parent
98986b2e02
commit
313de58d06
|
@ -1,4 +1,4 @@
|
|||
.\" $NetBSD: mount_kernfs.8,v 1.6 1995/03/18 14:57:24 cgd Exp $
|
||||
.\" $NetBSD: mount_kernfs.8,v 1.7 1997/09/15 04:47:17 lukem Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1992, 1993, 1994
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
|
@ -44,13 +44,13 @@
|
|||
.Nm mount_kernfs
|
||||
.Nd mount the /kern file system
|
||||
.Sh SYNOPSIS
|
||||
.Nm mount_kernfs
|
||||
.Nm
|
||||
.Op Fl o Ar options
|
||||
.Ar /kern
|
||||
.Ar mount_point
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Nm mount_kern
|
||||
.Nm
|
||||
command attaches an instance of the kernel parameter
|
||||
namespace to the global filesystem namespace.
|
||||
The conventional mount point is
|
||||
|
@ -136,5 +136,5 @@ can be generated by running:
|
|||
This filesystem may not be NFS-exported.
|
||||
.Sh HISTORY
|
||||
The
|
||||
.Nm mount_kernfs
|
||||
.Nm
|
||||
utility first appeared in 4.4BSD.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mount_kernfs.c,v 1.8 1996/04/13 05:35:39 cgd Exp $ */
|
||||
/* $NetBSD: mount_kernfs.c,v 1.9 1997/09/15 04:47:17 lukem Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1990, 1992 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_kernfs.c 8.2 (Berkeley) 3/27/94";
|
||||
#else
|
||||
static char rcsid[] = "$NetBSD: mount_kernfs.c,v 1.8 1996/04/13 05:35:39 cgd Exp $";
|
||||
__RCSID("$NetBSD: mount_kernfs.c,v 1.9 1997/09/15 04:47:17 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_KERNFS, argv[1], mntflags, NULL))
|
||||
err(1, NULL);
|
||||
err(1, "%s", "");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.\" $NetBSD: mount_lfs.8,v 1.3 1997/05/29 01:48:36 cgd Exp $
|
||||
.\" $NetBSD: mount_lfs.8,v 1.4 1997/09/15 04:52:36 lukem Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1993, 1994
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
|
@ -40,14 +40,14 @@
|
|||
.Nm mount_lfs
|
||||
.Nd mount a log-structured file system
|
||||
.Sh SYNOPSIS
|
||||
.Nm mount_lfs
|
||||
.Nm
|
||||
.Op Fl dns
|
||||
.Op Fl o Ar options
|
||||
.Ar special
|
||||
.Ar node
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Nm mount_lfs
|
||||
.Nm
|
||||
command attaches a log-structured file system
|
||||
.Ar special
|
||||
device on to the file system tree at the point
|
||||
|
@ -123,5 +123,5 @@ to read data in small chunks when cleaning the file system.
|
|||
.Re
|
||||
.Sh HISTORY
|
||||
The
|
||||
.Nm mount_lfs
|
||||
.Nm
|
||||
function first appeared in 4.4BSD.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mount_lfs.c,v 1.4 1996/04/13 05:35:44 cgd Exp $ */
|
||||
/* $NetBSD: mount_lfs.c,v 1.5 1997/09/15 04:52:37 lukem Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1993, 1994
|
||||
|
@ -33,17 +33,17 @@
|
|||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"@(#) Copyright (c) 1993, 1994\n\
|
||||
The Regents of the University of California. All rights reserved.\n";
|
||||
__COPYRIGHT("@(#) Copyright (c) 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_lfs.c 8.3 (Berkeley) 3/27/94";
|
||||
#else
|
||||
static char rcsid[] = "$NetBSD: mount_lfs.c,v 1.4 1996/04/13 05:35:44 cgd Exp $";
|
||||
__RCSID("$NetBSD: mount_lfs.c,v 1.5 1997/09/15 04:52:37 lukem Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -65,8 +65,9 @@ const struct mntopt mopts[] = {
|
|||
{ NULL }
|
||||
};
|
||||
|
||||
void usage __P((void));
|
||||
int main __P((int, char *[]));
|
||||
void invoke_cleaner __P((char *));
|
||||
void usage __P((void));
|
||||
|
||||
int short_rds, cleaner_debug;
|
||||
|
||||
|
@ -81,7 +82,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;
|
||||
|
@ -116,7 +117,7 @@ main(argc, argv)
|
|||
args.export.ex_flags = 0;
|
||||
|
||||
if (mount(MOUNT_LFS, fs_name, mntflags, &args))
|
||||
err(1, NULL);
|
||||
err(1, "%s", "");
|
||||
|
||||
if (!noclean)
|
||||
invoke_cleaner(fs_name);
|
||||
|
|
Loading…
Reference in New Issue