(uptime): Update read_utmp caller.

This commit is contained in:
Jim Meyering committed 1997-07-13 03:56:29 +00:00
1 parent aba02b5978
commit 393e4a8c36
1 file changed
+9 -4
+9 -4
View File
@@ -41,9 +41,8 @@ static struct option const longopts[] =
};
static void
print_uptime (int n)
print_uptime (int n, const STRUCT_UTMP *this)
{
register STRUCT_UTMP *this = utmp_contents;
register int entries = 0;
time_t boot_time = 0;
time_t time_now;
@@ -143,8 +142,14 @@ print_uptime (int n)
static void
uptime (const char *filename)
{
int n_users = read_utmp (filename);
print_uptime (n_users);
int n_users;
STRUCT_UTMP *utmp_buf;
int fail = read_utmp (filename, &n_users, &utmp_buf);
if (fail)
error (1, errno, "%s", filename);
print_uptime (n_users, utmp_buf);
}
static void