components/coreutils/patches/who.c.patch
author Rich Burridge <rich.burridge@oracle.com>
Fri, 08 Jan 2016 12:18:38 -0800
branchs11u3-sru
changeset 5249 8a7aa7f8367e
parent 584 f4e402a57670
permissions -rw-r--r--
16575074 stat could support birthtime/crtime on ZFS

Needed so that GNU 'who -r' correctly prints the run-level.
See CR #15651288 for more details.

This patch has not been passed upstream yet. It needs to be reworked into
a format that would be acceptable.

--- 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);