Ondřej Vašík <[EMAIL PROTECTED]> wrote: > 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.
Thank you for the patches! I applied the documentation one, after removing some trailing blanks and making some minor wording changes. As for the who.c patch, I prefer to omit "last=%c" for any non-printing byte, so did this: >From 63467fa18794f02497c7a46e3b7783ba1180f8fc Mon Sep 17 00:00:00 2001 From: Jim Meyering <[EMAIL PROTECTED]> Date: Fri, 4 Jul 2008 16:34:39 +0200 Subject: [PATCH] who -r: don't print "last=" when the corresponding byte is unprintable * src/who.c (print_runlevel): Print last=%c only when the "preceding run-level" byte is printable. Reported by Gian Piero De Lolliis in <http://bugzilla.redhat.com/453249>. --- src/who.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/who.c b/src/who.c index 5529618..0bba912 100644 --- a/src/who.c +++ b/src/who.c @@ -30,6 +30,7 @@ #include <sys/types.h> #include "system.h" +#include "c-ctype.h" #include "canon-host.h" #include "readutmp.h" #include "error.h" @@ -511,7 +512,7 @@ print_runlevel (const STRUCT_UTMP *utmp_ent) sprintf (comment, "%s%c", _("last="), (last == 'N') ? 'S' : last); print_line (-1, "", ' ', -1, runlevline, time_string (utmp_ent), - "", "", comment, ""); + "", "", c_isprint (last) ? comment : "", ""); return; } -- 1.5.6.1.206.g8dcaf96 >From 5483165b129b1ace218cb20d1a75ddff6ed45488 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: describe who's -p, -r, and -t options * doc/coreutils.texi (who invocation): --- doc/coreutils.texi | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/doc/coreutils.texi b/doc/coreutils.texi index 155ba8d..44df6b3 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 +List active processes spawned by init. + [EMAIL PROTECTED] -r [EMAIL PROTECTED] --runlevel [EMAIL PROTECTED] -r [EMAIL PROTECTED] --runlevel +Print the current (and maybe previous) run-level of the init process. + [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.6.1.206.g8dcaf96 _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils