diff options
author | markm <markm@FreeBSD.org> | 2002-03-24 15:06:48 +0000 |
---|---|---|
committer | markm <markm@FreeBSD.org> | 2002-03-24 15:06:48 +0000 |
commit | bda6eb4b895b0f54155daafc283d090fd878929d (patch) | |
tree | ab48eca184bf5f1c333682f959327bbbac2f2bac /sbin/fsck | |
parent | 67e76f4ab3c2cd6fa99b1a9cb8c6588e5ecf2eac (diff) | |
download | FreeBSD-src-bda6eb4b895b0f54155daafc283d090fd878929d.zip FreeBSD-src-bda6eb4b895b0f54155daafc283d090fd878929d.tar.gz |
Replace __progname with the functionally identical but more
acceptable (documented) getprogname(3).
Diffstat (limited to 'sbin/fsck')
-rw-r--r-- | sbin/fsck/fsck.c | 8 | ||||
-rw-r--r-- | sbin/fsck/fsutil.c | 25 |
2 files changed, 14 insertions, 19 deletions
diff --git a/sbin/fsck/fsck.c b/sbin/fsck/fsck.c index 3270d81..6b913bc 100644 --- a/sbin/fsck/fsck.c +++ b/sbin/fsck/fsck.c @@ -39,9 +39,7 @@ */ #include <sys/cdefs.h> -#ifndef lint -__RCSID("$FreeBSD$"); -#endif /* not lint */ +__FBSDID("$FreeBSD$"); #include <sys/param.h> #include <sys/mount.h> @@ -52,6 +50,7 @@ __RCSID("$FreeBSD$"); #include <sys/disklabel.h> #include <sys/ioctl.h> +#include <ctype.h> #include <err.h> #include <errno.h> #include <fstab.h> @@ -580,11 +579,10 @@ getfslab(const char *str) static void usage(void) { - extern char *__progname; static const char common[] = "[-BFdpvlyn] [-T fstype:fsoptions] [-t fstype]"; (void)fprintf(stderr, "Usage: %s %s [special|node]...\n", - __progname, common); + getprogname(), common); exit(1); } diff --git a/sbin/fsck/fsutil.c b/sbin/fsck/fsutil.c index e6e3629..f9fed44 100644 --- a/sbin/fsck/fsutil.c +++ b/sbin/fsck/fsutil.c @@ -31,36 +31,33 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $FreeBSD$ */ #include <sys/cdefs.h> #ifndef lint __RCSID("$NetBSD: fsutil.c,v 1.7 1998/07/30 17:41:03 thorpej Exp $"); #endif /* not lint */ - -#include <stdio.h> -#include <string.h> -#include <stdlib.h> -#include <stdarg.h> -#include <errno.h> -#include <fstab.h> -#include <err.h> -#include <paths.h> +__FBSDID("$FreeBSD$"); #include <sys/param.h> #include <sys/stat.h> #include <sys/mount.h> +#include <err.h> +#include <errno.h> +#include <fstab.h> +#include <paths.h> +#include <stdarg.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + #include "fsutil.h" static const char *dev = NULL; static int hot = 0; static int preen = 0; -extern char *__progname; - static void vmsg(int, const char *, va_list) __printflike(2, 0); void @@ -108,7 +105,7 @@ vmsg(int fatal, const char *fmt, va_list ap) if (fatal && preen) { (void) printf( "%s: UNEXPECTED INCONSISTENCY; RUN %s MANUALLY.\n", - dev, __progname); + dev, getprogname()); exit(8); } } |