From 1c614e098de6eba93b7161238dac585168eb79c5 Mon Sep 17 00:00:00 2001 From: Tom Rhodes Date: Thu, 23 Oct 2003 16:09:20 +0000 Subject: [PATCH] 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 --- sbin/mount_msdosfs/Makefile | 2 +- sbin/mount_msdosfs/mount_msdosfs.8 | 1 - sbin/mount_msdosfs/mount_msdosfs.c | 16 +++++++++------- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/sbin/mount_msdosfs/Makefile b/sbin/mount_msdosfs/Makefile index 3874ca013679..7fedb6818fab 100644 --- a/sbin/mount_msdosfs/Makefile +++ b/sbin/mount_msdosfs/Makefile @@ -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 diff --git a/sbin/mount_msdosfs/mount_msdosfs.8 b/sbin/mount_msdosfs/mount_msdosfs.8 index 1503b09166f3..609aa66ac9c9 100644 --- a/sbin/mount_msdosfs/mount_msdosfs.8 +++ b/sbin/mount_msdosfs/mount_msdosfs.8 @@ -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 , diff --git a/sbin/mount_msdosfs/mount_msdosfs.c b/sbin/mount_msdosfs/mount_msdosfs.c index dfbd7ba3421e..dcf0b292266a 100644 --- a/sbin/mount_msdosfs/mount_msdosfs.c +++ b/sbin/mount_msdosfs/mount_msdosfs.c @@ -38,9 +38,9 @@ static const char rcsid[] = #include #include #include -#include #include #include +#include #include @@ -56,6 +56,7 @@ static const char rcsid[] = #include #include #include + #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); }