Fix several old bugs which got worse over time:

o WARNS should be WARNS?= (broke in rev 1.21).
o Includes should be sorted.
o Move "mntopt.h" out of the standard includes section.
o Rewrite usage() to match the manual page and make it < 80 characters.
o Remove extra .El call on line 187.  It is unused and causes mdoc(7) warnings.

Discussed with:	bde
This commit is contained in:
Tom Rhodes 2003-10-23 16:09:20 +00:00
parent 64760eb06e
commit 1c614e098d
3 changed files with 10 additions and 9 deletions

View File

@ -10,7 +10,7 @@ LDADD= -lkiconv
MOUNT= ${.CURDIR}/../mount
CFLAGS+= -I${MOUNT}
WARNS= 2
WARNS?= 2
# Needs to be dynamically linked for optional dlopen() access to
# userland libiconv

View File

@ -184,7 +184,6 @@ To mount a Japanese msdos file system located in /dev/ad1s1:
.Bd -literal -offset indent
# mount_msdosfs -L ja_JP.eucJP -D CP932 /dev/ad1s1 /mnt
.Ed
.El
.Sh SEE ALSO
.Xr mount 2 ,
.Xr unmount 2 ,

View File

@ -38,9 +38,9 @@ static const char rcsid[] =
#include <sys/param.h>
#include <sys/mount.h>
#include <sys/stat.h>
#include <sys/module.h>
#include <sys/iconv.h>
#include <sys/linker.h>
#include <sys/module.h>
#include <fs/msdosfs/msdosfsmount.h>
@ -56,6 +56,7 @@ static const char rcsid[] =
#include <string.h>
#include <sysexits.h>
#include <unistd.h>
#include "mntopts.h"
#define TRANSITION_PERIOD_HACK
@ -312,13 +313,14 @@ usage()
{
#ifdef TRANSITION_PERIOD_HACK
fprintf(stderr, "%s\n%s\n%s\n",
"usage: mount_msdosfs [-o options] [-u user] [-g group] [-m mask] [-M mask]",
" [-s] [-l] [-9] [-L locale] [-D dos-codepage] [-W table]",
" bdev dir");
"usage: mount_msdosfs [-9ls] [-D DOS_codepage] [-g gid] [-L locale]",
" [-M mask] [-m mask] [-o options] [-u uid]",
" [-W table] special node");
#else
fprintf(stderr, "%s\n%s\n",
"usage: mount_msdosfs [-o options] [-u user] [-g group] [-m mask] [-M mask]",
" [-s] [-l] [-9] [-L locale] [-D dos-codepage] bdev dir");
fprintf(stderr, "%s\n%s\n%s\n",
"usage: mount_msdosfs [-9ls] [-D DOS_codepage] [-g gid] [-L locale]",
" [-M mask] [-m mask] [-o options] [-u uid]",
" special node");
#endif
exit(EX_USAGE);
}