6962990 GNU 'who -r' does not print run-level
authorRich Burridge <rich.burridge@oracle.com>
Mon, 14 Nov 2011 09:56:09 -0800
changeset 584 f4e402a57670
parent 583 fa23089af66f
child 585 1d18a6d1c29a
6962990 GNU 'who -r' does not print run-level
components/coreutils/patches/who.c.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/coreutils/patches/who.c.patch	Mon Nov 14 09:56:09 2011 -0800
@@ -0,0 +1,13 @@
+--- coreutils-8.5/src/who.c.orig	Thu Nov 10 07:54:27 2011
++++ coreutils-8.5/src/who.c	Thu Nov 10 07:55:13 2011
+@@ -524,8 +524,8 @@
+   unsigned char curr = UT_PID (utmp_ent) % 256;
+ 
+   if (!runlevline)
+-    runlevline = xmalloc (strlen (_("run-level")) + 3);
+-  sprintf (runlevline, "%s %c", _("run-level"), curr);
++    runlevline = xmalloc (sizeof (utmp_ent->ut_line));
++  sprintf (runlevline, "%s", utmp_ent->ut_line);
+ 
+   if (!comment)
+     comment = xmalloc (strlen (_("last=")) + 2);