textual: standardize the reporting of program name plus package version

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
This commit is contained in:
Benno Schulenberg 2013-01-23 13:48:50 +01:00 committed by Karel Zak
parent 4ec32f6a89
commit 0c6625a15d
3 changed files with 3 additions and 5 deletions

View File

@ -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);

View File

@ -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

View File

@ -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: