From 275644abc591d1e8652263e1ace62012f1292994 Mon Sep 17 00:00:00 2001 From: =?utf-8?q?Ond=C5=99ej=20Va=C5=A1=C3=ADk?= Date: Wed, 2 Jul 2008 13:38:15 +0200 Subject: [PATCH] *src/who.c: handle empty last runlevel in who -r as 'S'. Signed-off-by: Ondřej Vašík --- src/who.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/who.c b/src/who.c index 5529618..952023a 100644 --- a/src/who.c +++ b/src/who.c @@ -508,7 +508,7 @@ print_runlevel (const STRUCT_UTMP *utmp_ent) if (!comment) comment = xmalloc (strlen (_("last=")) + 2); - sprintf (comment, "%s%c", _("last="), (last == 'N') ? 'S' : last); + sprintf (comment, "%s%c", _("last="), (!last || last == 'N') ? 'S' : last); print_line (-1, "", ' ', -1, runlevline, time_string (utmp_ent), "", "", comment, ""); -- 1.5.2.2