]> git.cameronkatri.com Git - getent-darwin.git/commitdiff
Also let getent(1) print values of ut_pid.
authorEd Schouten <ed@FreeBSD.org>
Mon, 18 Jan 2010 10:50:25 +0000 (10:50 +0000)
committerEd Schouten <ed@FreeBSD.org>
Mon, 18 Jan 2010 10:50:25 +0000 (10:50 +0000)
getent.c

index bc76825dd44929cc87357c799422619813477cad..e6e33a0a430d5bda187a48e3fce4cd72a4cb045c 100644 (file)
--- a/getent.c
+++ b/getent.c
@@ -601,13 +601,13 @@ utmpxprint(const struct utmpx *ut)
        case USER_PROCESS:
                printf("user process: id=\"");
                UTMPXPRINTID;
-               printf("\" user=\"%s\" line=\"%s\" host=\"%s\"\n",
-                   ut->ut_user, ut->ut_line, ut->ut_host);
+               printf("\" pid=\"%d\" user=\"%s\" line=\"%s\" host=\"%s\"\n",
+                   ut->ut_pid, ut->ut_user, ut->ut_line, ut->ut_host);
                break;
        case DEAD_PROCESS:
                printf("dead process: id=\"");
                UTMPXPRINTID;
-               printf("\"\n");
+               printf("\" pid=\"%d\"\n", ut->ut_pid);
                break;
        default:
                printf("unknown record type\n");