Replace use of __progname with the functionally identical and more
acceptable getprogname(3).
This commit is contained in:
parent
c252d16969
commit
55fad6bb0f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=93101
@ -38,10 +38,11 @@
|
|||||||
#ifndef lint
|
#ifndef lint
|
||||||
static const char copyright[] =
|
static const char copyright[] =
|
||||||
"@(#) Copyright (c) 1996 Jason R. Thorpe. All rights reserved.";
|
"@(#) Copyright (c) 1996 Jason R. Thorpe. All rights reserved.";
|
||||||
static const char rcsid[] =
|
|
||||||
"$FreeBSD$";
|
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
|
#include <sys/cdefs.h>
|
||||||
|
__FBSDID("$FreeBSD$");
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/chio.h>
|
#include <sys/chio.h>
|
||||||
#include <err.h>
|
#include <err.h>
|
||||||
@ -55,8 +56,6 @@ static const char rcsid[] =
|
|||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "pathnames.h"
|
#include "pathnames.h"
|
||||||
|
|
||||||
extern char *__progname; /* from crt0.o */
|
|
||||||
|
|
||||||
static void usage(void);
|
static void usage(void);
|
||||||
static void cleanup(void);
|
static void cleanup(void);
|
||||||
static u_int16_t parse_element_type(char *);
|
static u_int16_t parse_element_type(char *);
|
||||||
@ -248,7 +247,7 @@ do_move(const char *cname, int argc, char **argv)
|
|||||||
|
|
||||||
usage:
|
usage:
|
||||||
(void) fprintf(stderr, "usage: %s %s "
|
(void) fprintf(stderr, "usage: %s %s "
|
||||||
"<from ET> <from EU> <to ET> <to EU> [inv]\n", __progname, cname);
|
"<from ET> <from EU> <to ET> <to EU> [inv]\n", getprogname(), cname);
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -357,7 +356,7 @@ do_exchange(const char *cname, int argc, char **argv)
|
|||||||
(void) fprintf(stderr,
|
(void) fprintf(stderr,
|
||||||
"usage: %s %s <src ET> <src EU> <dst1 ET> <dst1 EU>\n"
|
"usage: %s %s <src ET> <src EU> <dst1 ET> <dst1 EU>\n"
|
||||||
" [<dst2 ET> <dst2 EU>] [inv1] [inv2]\n",
|
" [<dst2 ET> <dst2 EU>] [inv1] [inv2]\n",
|
||||||
__progname, cname);
|
getprogname(), cname);
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -417,7 +416,7 @@ do_position(const char *cname, int argc, char **argv)
|
|||||||
|
|
||||||
usage:
|
usage:
|
||||||
(void) fprintf(stderr, "usage: %s %s <to ET> <to EU> [inv]\n",
|
(void) fprintf(stderr, "usage: %s %s <to ET> <to EU> [inv]\n",
|
||||||
__progname, cname);
|
getprogname(), cname);
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -460,7 +459,7 @@ do_params(const char *cname, int argc, char **argv)
|
|||||||
return (0);
|
return (0);
|
||||||
|
|
||||||
usage:
|
usage:
|
||||||
(void) fprintf(stderr, "usage: %s %s\n", __progname, cname);
|
(void) fprintf(stderr, "usage: %s %s\n", getprogname(), cname);
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -488,7 +487,7 @@ do_getpicker(const char *cname, int argc, char **argv)
|
|||||||
return (0);
|
return (0);
|
||||||
|
|
||||||
usage:
|
usage:
|
||||||
(void) fprintf(stderr, "usage: %s %s\n", __progname, cname);
|
(void) fprintf(stderr, "usage: %s %s\n", getprogname(), cname);
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -516,7 +515,7 @@ do_setpicker(const char *cname, int argc, char **argv)
|
|||||||
return (0);
|
return (0);
|
||||||
|
|
||||||
usage:
|
usage:
|
||||||
(void) fprintf(stderr, "usage: %s %s <picker>\n", __progname, cname);
|
(void) fprintf(stderr, "usage: %s %s <picker>\n", getprogname(), cname);
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -733,7 +732,7 @@ do_status(const char *cname, int argc, char **argv)
|
|||||||
|
|
||||||
usage:
|
usage:
|
||||||
(void) fprintf(stderr, "usage: %s %s [-vVsSbaA] [<element type> [<start-addr> [<end-addr>] ] ]\n",
|
(void) fprintf(stderr, "usage: %s %s [-vVsSbaA] [<element type> [<start-addr> [<end-addr>] ] ]\n",
|
||||||
__progname, cname);
|
getprogname(), cname);
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -756,7 +755,7 @@ do_ielem(const char *cname, int argc, char **argv)
|
|||||||
|
|
||||||
usage:
|
usage:
|
||||||
(void) fprintf(stderr, "usage: %s %s [<timeout>]\n",
|
(void) fprintf(stderr, "usage: %s %s [<timeout>]\n",
|
||||||
__progname, cname);
|
getprogname(), cname);
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -841,7 +840,7 @@ do_voltag(const char *cname, int argc, char **argv)
|
|||||||
usage:
|
usage:
|
||||||
(void) fprintf(stderr,
|
(void) fprintf(stderr,
|
||||||
"usage: %s %s [-fca] <element> [<voltag> [<vsn>] ]\n",
|
"usage: %s %s [-fca] <element> [<voltag> [<vsn>] ]\n",
|
||||||
__progname, cname);
|
getprogname(), cname);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -991,7 +990,7 @@ do_return(const char *cname, int argc, char **argv)
|
|||||||
|
|
||||||
usage:
|
usage:
|
||||||
(void) fprintf(stderr, "usage: %s %s "
|
(void) fprintf(stderr, "usage: %s %s "
|
||||||
"<from ET> <from EU>\n", __progname, cname);
|
"<from ET> <from EU>\n", getprogname(), cname);
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1170,6 +1169,6 @@ static void
|
|||||||
usage(void)
|
usage(void)
|
||||||
{
|
{
|
||||||
(void)fprintf(stderr, "usage: %s [-f changer] command [-<flags>] "
|
(void)fprintf(stderr, "usage: %s [-f changer] command [-<flags>] "
|
||||||
"arg1 arg2 [arg3 [...]]\n", __progname);
|
"arg1 arg2 [arg3 [...]]\n", getprogname());
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user