* mkgroup.c (main): Change call to exit() to a return statement.

* mkpasswd.c (main): Ditto.

	* mkpasswd.c (usage): Simplify usage output.  Generalize to allow use
	for help. Correct '?' typo to 'h'.
	(longopts): Add version option.
	(opts): Add 'v' version option.
	(print_version): New function.
	(main): Accommodate new version option.  Accommodate usage parameter
	changes.
This commit is contained in:
Corinna Vinschen
2002-04-29 10:21:54 +00:00
parent 557856bdd9
commit eccebec08d
3 changed files with 70 additions and 26 deletions

View File

@@ -512,7 +512,7 @@ main (int argc, char **argv)
return usage (stdout, 0);
case 'v':
print_version ();
exit (0);
return 0;
default:
fprintf (stderr, "Try `%s --help' for more information.\n", argv[0]);
return 1;
@@ -617,7 +617,7 @@ main (int argc, char **argv)
if (rc != ERROR_SUCCESS)
{
fprintf (stderr, "Cannot get PDC, code = %ld\n", rc);
exit (1);
return 1;
}
enum_groups (servername, print_sids, print_users, id_offset);