mirror of
https://git.FreeBSD.org/src.git
synced 2024-10-19 02:29:40 +00:00
ctfdump: Use getprogname()
Also remove no longer used function `getpname()`. Reviewed by: markj MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D38740
This commit is contained in:
parent
3a01a97d23
commit
3dd5524264
@ -35,30 +35,6 @@
|
||||
|
||||
/*LINTLIBRARY*/
|
||||
|
||||
static const char *pname;
|
||||
|
||||
#pragma init(getpname)
|
||||
const char *
|
||||
getpname(void)
|
||||
{
|
||||
const char *p, *q;
|
||||
|
||||
if (pname != NULL)
|
||||
return (pname);
|
||||
|
||||
if ((p = getexecname()) != NULL)
|
||||
q = strrchr(p, '/');
|
||||
else
|
||||
q = NULL;
|
||||
|
||||
if (q == NULL)
|
||||
pname = p;
|
||||
else
|
||||
pname = q + 1;
|
||||
|
||||
return (pname);
|
||||
}
|
||||
|
||||
void
|
||||
vdie(const char *format, va_list alist)
|
||||
{
|
||||
|
@ -856,7 +856,7 @@ print_stats(void)
|
||||
static int
|
||||
print_usage(FILE *fp, int verbose)
|
||||
{
|
||||
(void) fprintf(fp, "Usage: %s [-dfhlsSt] [-u file] file\n", getpname());
|
||||
(void) fprintf(fp, "Usage: %s [-dfhlsSt] [-u file] file\n", getprogname());
|
||||
|
||||
if (verbose) {
|
||||
(void) fprintf(fp,
|
||||
|
Loading…
Reference in New Issue
Block a user