(main): use print_version

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5922 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1999-04-10 23:59:55 +00:00
parent 24abaad83b
commit 8b3efe9a2f
2 changed files with 5 additions and 3 deletions

View File

@@ -376,8 +376,10 @@ main(int argc, char **argv)
if(help_flag)
usage(0);
if (version_flag)
errx(0, "%s version %s", PACKAGE, VERSION);
if (version_flag) {
print_version (NULL);
return 0;
}
if (geteuid() != 0)
err(1, "only root may use login, use su");

View File

@@ -225,7 +225,7 @@ main(int argc, char **argv)
usage (0);
if (do_version) {
printf ("%s (%s-%s)\n", __progname, PACKAGE, VERSION);
print_version (NULL);
return 0;
}