* update for WARNS=1

* getopt returns -1 not EOF
* fix .Nm usage
This commit is contained in:
lukem 1997-09-15 04:27:38 +00:00
parent f7eccc059d
commit 7d9f8002c0
2 changed files with 12 additions and 11 deletions

View File

@ -1,4 +1,4 @@
.\" $NetBSD: mount_cd9660.8,v 1.3 1995/04/23 10:33:13 cgd Exp $
.\" $NetBSD: mount_cd9660.8,v 1.4 1997/09/15 04:27:38 lukem Exp $
.\"
.\" Copyright (c) 1993, 1994
.\" The Regents of the University of California. All rights reserved.
@ -43,13 +43,13 @@
.Nm mount_cd9660
.Nd mount an ISO-9660 filesystem
.Sh SYNOPSIS
.Nm mount_cd9660
.Nm
.Op Fl egr
.Op Fl o Ar options
.Ar special | node
.Sh DESCRIPTION
The
.Nm mount_cd9660
.Nm
command attaches the ISO-9660 filesystem residing on the device
.Pa special
to the global filesystem namespace at the location indicated by
@ -97,5 +97,5 @@ the one with the highest.
There is no ECMA support.
.Sh HISTORY
The
.Nm mount_cd9660
.Nm
utility first appeared 4.4BSD.

View File

@ -1,4 +1,4 @@
/* $NetBSD: mount_cd9660.c,v 1.3 1996/04/13 01:31:08 jtc Exp $ */
/* $NetBSD: mount_cd9660.c,v 1.4 1997/09/15 04:27:38 lukem Exp $ */
/*
* Copyright (c) 1992, 1993, 1994
@ -38,17 +38,17 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#ifndef lint
static 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_cd9660.c 8.4 (Berkeley) 3/27/94";
#else
static char rcsid[] = "$NetBSD: mount_cd9660.c,v 1.3 1996/04/13 01:31:08 jtc Exp $";
__RCSID("$NetBSD: mount_cd9660.c,v 1.4 1997/09/15 04:27:38 lukem Exp $");
#endif
#endif /* not lint */
@ -70,6 +70,7 @@ const struct mntopt mopts[] = {
{ NULL }
};
int main __P((int, char *[]));
void usage __P((void));
int
@ -82,7 +83,7 @@ main(argc, argv)
char *dev, *dir;
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;
@ -120,7 +121,7 @@ main(argc, argv)
args.flags = opts;
if (mount(MOUNT_CD9660, dir, mntflags, &args) < 0)
err(1, NULL);
err(1, "%s", "");
exit(0);
}