From 8e2e167cdd13652b86eed6d4a60ea4df6ae8be0b Mon Sep 17 00:00:00 2001 From: Mark Murray Date: Sun, 24 Mar 2002 15:17:53 +0000 Subject: [PATCH] Replace __progname with the documented, more acceptable and functionally identical getprogname(3). --- sbin/fsck_ffs/main.c | 9 ++++----- sbin/fsck_ifs/main.c | 10 +++++----- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/sbin/fsck_ffs/main.c b/sbin/fsck_ffs/main.c index 6b25aa071427..55e25c369230 100644 --- a/sbin/fsck_ffs/main.c +++ b/sbin/fsck_ffs/main.c @@ -41,10 +41,11 @@ static const char copyright[] = #if 0 static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 5/14/95"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include @@ -496,11 +497,9 @@ getmntpt(const char *name) static void usage(void) { - extern char *__progname; - (void) fprintf(stderr, "Usage: %s [-BFpfny] [-b block] [-c level] [-m mode] " "filesystem ...\n", - __progname); + getprogname()); exit(1); } diff --git a/sbin/fsck_ifs/main.c b/sbin/fsck_ifs/main.c index dca19c2d3821..356d90f22c13 100644 --- a/sbin/fsck_ifs/main.c +++ b/sbin/fsck_ifs/main.c @@ -41,10 +41,11 @@ static const char copyright[] = #if 0 static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 5/14/95"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include @@ -59,6 +60,7 @@ static const char rcsid[] = #include #include #include +#include #include "fsck.h" @@ -395,11 +397,9 @@ getmntpt(const char *name) static void usage(void) { - extern char *__progname; - (void) fprintf(stderr, "Usage: %s [-dfnpy] [-B be|le] [-b block] [-c level] [-m mode] " "filesystem ...\n", - __progname); + getprogname()); exit(1); }