* cleanup WARNS=1

* getopt returns -1 not EOF
* use .Nm correctly
This commit is contained in:
lukem 1997-09-15 04:31:48 +00:00
parent 7d9f8002c0
commit 6a6a54d567
2 changed files with 12 additions and 11 deletions

View File

@ -1,4 +1,4 @@
.\" $NetBSD: mount_ext2fs.8,v 1.3 1997/07/09 05:54:15 mikel Exp $
.\" $NetBSD: mount_ext2fs.8,v 1.4 1997/09/15 04:31:48 lukem Exp $
.\"
.\" Copyright (c) 1993, 1994
.\" The Regents of the University of California. All rights reserved.
@ -39,13 +39,13 @@
.Nm mount_ext2fs
.Nd Mount an EXT2FS file system
.Sh SYNOPSIS
.Nm mount_ext2fs
.Nm
.Op Fl o Ar options
.Ar special
.Ar node
.Sh DESCRIPTION
The
.Nm mount_ext2fs
.Nm
command attaches an EXT2FS file system
.Ar special
device on to the file system tree at the point
@ -78,5 +78,5 @@ any UID or GID greater than 65535.
.Xr mount 8
.Sh HISTORY
The
.Nm mount_ext2fs
.Nm
utility first appeared in FreeBSD 2.2.

View File

@ -1,4 +1,4 @@
/* $NetBSD: mount_ext2fs.c,v 1.1 1997/06/11 11:21:44 bouyer Exp $ */
/* $NetBSD: mount_ext2fs.c,v 1.2 1997/09/15 04:31:50 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_ufs.c 8.2 (Berkeley) 3/27/94";
#else
static char rcsid[] = "$NetBSD: mount_ext2fs.c,v 1.1 1997/06/11 11:21:44 bouyer Exp $";
__RCSID("$NetBSD: mount_ext2fs.c,v 1.2 1997/09/15 04:31:50 lukem Exp $");
#endif
#endif /* not lint */
@ -60,6 +60,7 @@ static char rcsid[] = "$NetBSD: mount_ext2fs.c,v 1.1 1997/06/11 11:21:44 bouyer
#include "mntopts.h"
void ext2fs_usage __P((void));
int main __P((int, char *[]));
static const struct mntopt mopts[] = {
MOPT_STDOPTS,
@ -73,7 +74,7 @@ static const struct mntopt mopts[] = {
int
main(argc, argv)
int argc;
char * const argv[];
char *argv[];
{
extern int optreset;
struct ufs_args args; /* XXX ffs_args */
@ -82,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);