printf (_("Usage: %s [OPTION]... [USER]...\n"), program_name);
printf (_("\
\n\
- -l do long format output (you must specify at least one USER)\n\
+ -l produce long format output for the specified USERs\n\
-b omit the user's home directory and shell in long format\n\
-h omit the user's project file in long format\n\
-p omit the user's plan file in long format\n\
main (int argc, char **argv)
{
int optc, longind;
+ int n_users;
program_name = argv[0];
setlocale (LC_ALL, "");
}
}
+ n_users = argc - optind;
+
+ if (do_short_format == 0 && n_users == 0)
+ {
+ error (0, 0, _("no username specified; at least one must be\
+ specified when using -l"));
+ usage (1);
+ }
+
if (do_short_format)
short_pinky (UTMP_FILE, argc - optind, argv + optind);
else