| 122 | utmp file. */ |
| 123 | |
| 124 | static _Noreturn void |
| 125 | uptime (char const *filename, int options) |
| 126 | { |
| 127 | idx_t n_users; |
| 128 | STRUCT_UTMP *utmp_buf; |
| 129 | int read_utmp_status = (read_utmp (filename, &n_users, &utmp_buf, options) < 0 |
| 130 | ? EXIT_FAILURE : EXIT_SUCCESS); |
| 131 | if (read_utmp_status != EXIT_SUCCESS) |
| 132 | { |
| 133 | error (0, errno, "%s", quotef (filename)); |
| 134 | n_users = 0; |
| 135 | utmp_buf = NULL; |
| 136 | } |
| 137 | |
| 138 | int print_uptime_status = print_uptime (n_users, utmp_buf); |
| 139 | exit (MAX (read_utmp_status, print_uptime_status)); |
| 140 | } |
| 141 | |
| 142 | void |
| 143 | usage (int status) |