Hello,
In rhbz #453249 Gian Piero De Lolliis ([EMAIL PROTECTED]) reported missing last
runlevel in who -r. Command runlevel displayed last runlevel 'N' - which
should be displayed as last=S in who -r. Attached patch fixes that issue
(another possibility could be to not display "last=" at all for this
case). As this is just a small change I think it doesn't deserve
mentioning in NEWS.

Additionally I found that there are some options missing in
coreutils.texi "who" section. I added just the options + basic info from
help, it would be good to extend it, but this is at least first step.

Greetings,
         Ondrej Vasik
From 275644abc591d1e8652263e1ace62012f1292994 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Ond=C5=99ej=20Va=C5=A1=C3=ADk?= <[EMAIL PROTECTED]>
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 <[EMAIL PROTECTED]>
---
 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

From 10db2e5e05c67eea205b3ec76a2408f46356a7fd Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Ond=C5=99ej=20Va=C5=A1=C3=ADk?= <[EMAIL PROTECTED]>
Date: Wed, 2 Jul 2008 14:11:05 +0200
Subject: [PATCH] *doc/coreutils.texi: Mention some missing options for who command


Signed-off-by: Ondřej Vašík <[EMAIL PROTECTED]>
---
 doc/coreutils.texi |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 155ba8d..c0ea237 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -12710,6 +12710,24 @@ automatic dial-up internet access.
 @opindex --heading
 Print a line of column headings.
 
[EMAIL PROTECTED] -p
[EMAIL PROTECTED] --process
[EMAIL PROTECTED] -p
[EMAIL PROTECTED] --process
+Print active processes spawned by init.
+
[EMAIL PROTECTED] -r
[EMAIL PROTECTED] --runlevel
[EMAIL PROTECTED] -r
[EMAIL PROTECTED] --runlevel
+Print current and last runlevel. 
+
[EMAIL PROTECTED] -t
[EMAIL PROTECTED] --time
[EMAIL PROTECTED] -t
[EMAIL PROTECTED] --time
+Print last system clock change. 
+
 @item -w
 @itemx -T
 @itemx --mesg
-- 
1.5.2.2

Attachment: signature.asc
Description: Toto je digitálně podepsaná část zprávy

_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to