initctl: Support for utmp show FILE

This patch adds support for showing a log rotated (uncompressed)
UTMP/WTMP file in initctl.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2017-02-10 11:44:57 +01:00
parent 5ea1ac7582
commit 9df0454b64
+4 -1
View File
@@ -407,8 +407,11 @@ int utmp_show(char *file)
return 0;
}
static int do_utmp(char *UNUSED(cmd))
static int do_utmp(char *file)
{
if (file)
return utmp_show(file);
return utmp_show(_PATH_WTMP) ||
utmp_show(_PATH_UTMP);
}