textual: standardize the reporting of program name plus package version
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
This commit is contained in:
parent
4ec32f6a89
commit
0c6625a15d
|
@ -213,7 +213,7 @@ static void
|
|||
die(const char *fmt, ...) {
|
||||
va_list ap;
|
||||
|
||||
fprintf(stderr, "%s: ", program_invocation_short_name);
|
||||
fprintf(stderr, UTIL_LINUX_VERSION);
|
||||
va_start(ap, fmt);
|
||||
vfprintf(stderr, fmt, ap);
|
||||
va_end(ap);
|
||||
|
|
|
@ -206,8 +206,7 @@ int main(int argc, char *argv[])
|
|||
_("invalid exit code"));
|
||||
break;
|
||||
case 'V':
|
||||
printf(_("%s from %s\n"),
|
||||
program_invocation_short_name, PACKAGE_STRING);
|
||||
printf(UTIL_LINUX_VERSION);
|
||||
exit(EX_OK);
|
||||
default:
|
||||
/* optopt will be set if this was an unrecognized
|
||||
|
|
|
@ -568,8 +568,7 @@ void argscan(char *s)
|
|||
case '\t':
|
||||
break;
|
||||
case 'V':
|
||||
printf(_("%s from %s\n"),
|
||||
program_invocation_short_name, PACKAGE_STRING);
|
||||
printf(UTIL_LINUX_VERSION);
|
||||
exit(EXIT_SUCCESS);
|
||||
break;
|
||||
default:
|
||||
|
|
Loading…
Reference in New Issue