When we are only interested in entries of type USER_PROCESS, tell
read_utmp that it does not need to determine the boot time.
* src/pinky.c (short_pinky): Pass option READ_UTMP_USER_PROCESS.
* src/users.c (users): Likewise.
* src/who.c (who): Likewise, if calling list_entries_who.
{
idx_t n_users;
struct gl_utmp *utmp_buf;
- if (read_utmp (filename, &n_users, &utmp_buf, 0) != 0)
+ if (read_utmp (filename, &n_users, &utmp_buf, READ_UTMP_USER_PROCESS) != 0)
error (EXIT_FAILURE, errno, "%s", quotef (filename));
scan_entries (n_users, utmp_buf, argc_names, argv_names);
{
idx_t n_users;
struct gl_utmp *utmp_buf;
+ options |= READ_UTMP_USER_PROCESS;
if (read_utmp (filename, &n_users, &utmp_buf, options) != 0)
error (EXIT_FAILURE, errno, "%s", quotef (filename));
{
idx_t n_users;
struct gl_utmp *utmp_buf;
+ if (short_list)
+ options |= READ_UTMP_USER_PROCESS;
if (read_utmp (filename, &n_users, &utmp_buf, options) != 0)
error (EXIT_FAILURE, errno, "%s", quotef (filename));