79 lines
2.0 KiB
Diff
79 lines
2.0 KiB
Diff
|
From 63467fa18794f02497c7a46e3b7783ba1180f8fc Mon Sep 17 00:00:00 2001
|
||
|
From: Jim Meyering <meyering@redhat.com>
|
||
|
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 10db2e5e05c67eea205b3ec76a2408f46356a7fd Mon Sep 17 00:00:00 2001
|
||
|
From: =?utf-8?q?Ond=C5=99ej=20Va=C5=A1=C3=ADk?= <ovasik@redhat.com>
|
||
|
Date: Wed, 2 Jul 2008 14:11:05 +0200
|
||
|
Subject: [PATCH] doci: 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..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.
|
||
|
|
||
|
+@item -p
|
||
|
+@itemx --process
|
||
|
+@opindex -p
|
||
|
+@opindex --process
|
||
|
+List active processes spawned by init.
|
||
|
+
|
||
|
+@item -r
|
||
|
+@itemx --runlevel
|
||
|
+@opindex -r
|
||
|
+@opindex --runlevel
|
||
|
+Print the current (and maybe previous) run-level of the init process.
|
||
|
+
|
||
|
+@item -t
|
||
|
+@itemx --time
|
||
|
+@opindex -t
|
||
|
+@opindex --time
|
||
|
+Print last system clock change.
|
||
|
+
|
||
|
@item -w
|
||
|
@itemx -T
|
||
|
@itemx --mesg
|
||
|
--
|
||
|
1.5.2.2
|
||
|
|