Hi,

I just realized a bad behavior showing the number of users in uptime.
Patch attached.

Regards,
-- 
Pere
From cd23839fa775151bb3677e51d3e8ada2ff79cac8 Mon Sep 17 00:00:00 2001
From: Pere Orga <[email protected]>
Date: Mon, 5 Mar 2012 18:57:08 +0100
Subject: [PATCH] uptime: fix spelling issue when users==1


Signed-off-by: Pere Orga <[email protected]>
---
 procps/uptime.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/procps/uptime.c b/procps/uptime.c
index 778812a..16bf7c5 100644
--- a/procps/uptime.c
+++ b/procps/uptime.c
@@ -87,7 +87,7 @@ int uptime_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
 			if ((ut->ut_type == USER_PROCESS) && (ut->ut_name[0] != '\0'))
 				users++;
 		}
-		printf(",  %u users", users);
+		printf(",  %u user%s", users, (users != 1) ? "s" : "");
 	}
 #endif
 
-- 
1.7.9.1

_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to