[PATCH 09/34] utmpdump: use unlocked io, and avoid use of printf()

Sami Kerola
2013-07-07T19:55:24Z

login-utils/utmpdump.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/login-utils/utmpdump.c b/login-utils/utmpdump.c
index af3f7c0..3febeaf 100644
--- a/login-utils/utmpdump.c
+++ b/login-utils/utmpdump.c
@@ -44,6 +44,7 @@
#include "nls.h"
#include "xalloc.h"
#include "closestream.h"
+#include "unlocked-io.h"

static char *timetostr(const time_t time)
{
@@ -361,10 +362,14 @@ int main(int argc, char **argv)
}

if (reverse) {
- fprintf(stderr, _("Utmp undump of %s\n"), filename);
+ fputs(_("Utmp undump of"), stderr);
+ fputs(filename, stderr);
+ fputs("\n", stderr);
undump(in, out);
} else {
- fprintf(stderr, _("Utmp dump of %s\n"), filename);
+ fputs(_("Utmp dump of"), stderr);
+ fputs(filename, stderr);
+ fputs("\n", stderr);
in = dump(in, filename, follow, out);
}

--
1.8.3.2