MCPcopy Create free account
hub / github.com/coreutils/coreutils / who

Function who

src/who.c:605–621  ·  view source on GitHub ↗

Display a list of who is on the system, according to utmp file FILENAME. Use read_utmp OPTIONS to read the file. */

Source from the content-addressed store, hash-verified

603/* Display a list of who is on the system, according to utmp file FILENAME.
604 Use read_utmp OPTIONS to read the file. */
605static void
606who (char const *filename, int options)
607{
608 idx_t n_users;
609 STRUCT_UTMP *utmp_buf;
610 if (short_list)
611 options |= READ_UTMP_USER_PROCESS;
612 if (read_utmp (filename, &n_users, &utmp_buf, options) != 0)
613 error (EXIT_FAILURE, errno, "%s", quotef (filename));
614
615 if (short_list)
616 list_entries_who (n_users, utmp_buf);
617 else
618 scan_entries (n_users, utmp_buf);
619
620 free (utmp_buf);
621}
622
623void
624usage (int status)

Callers 1

mainFunction · 0.85

Calls 2

list_entries_whoFunction · 0.85
scan_entriesFunction · 0.70

Tested by

no test coverage detected