Replace __progname with the documented, more acceptable and functionally identical getprogname(3).

This commit is contained in:
Mark Murray 2002-03-24 15:17:53 +00:00
parent b813a7142b
commit 8e2e167cdd
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=93103
2 changed files with 9 additions and 10 deletions

View File

@ -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 <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/stat.h>
#include <sys/file.h>
@ -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);
}

View File

@ -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 <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/stat.h>
#include <sys/time.h>
@ -59,6 +60,7 @@ static const char rcsid[] =
#include <errno.h>
#include <fstab.h>
#include <paths.h>
#include <stdlib.h>
#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);
}