From b813a7142b1d947bc91a956ce276fc31e0bd178c Mon Sep 17 00:00:00 2001 From: Mark Murray Date: Sun, 24 Mar 2002 15:06:48 +0000 Subject: [PATCH] Replace __progname with the functionally identical but more acceptable (documented) getprogname(3). --- sbin/fsck/fsck.c | 8 +++----- 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 3270d81e5807..6b913bc70c83 100644 --- a/sbin/fsck/fsck.c +++ b/sbin/fsck/fsck.c @@ -39,9 +39,7 @@ */ #include -#ifndef lint -__RCSID("$FreeBSD$"); -#endif /* not lint */ +__FBSDID("$FreeBSD$"); #include #include @@ -52,6 +50,7 @@ __RCSID("$FreeBSD$"); #include #include +#include #include #include #include @@ -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 e6e3629f21d5..f9fed44e0ccb 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 #ifndef lint __RCSID("$NetBSD: fsutil.c,v 1.7 1998/07/30 17:41:03 thorpej Exp $"); #endif /* not lint */ - -#include -#include -#include -#include -#include -#include -#include -#include +__FBSDID("$FreeBSD$"); #include #include #include +#include +#include +#include +#include +#include +#include +#include +#include + #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); } }