aboutsummaryrefslogtreecommitdiff
path: root/procps
diff options
context:
space:
mode:
authorandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2002-09-30 20:39:56 +0000
committerandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2002-09-30 20:39:56 +0000
commit613d1366341793b382f63572d472016c1ad7b5a0 (patch)
treecc1954165fe7e6efed1ba0dfa7d5c3aea97fffa5 /procps
parentf41de5a7d48afe17882100c94eee4fd5a7016b5f (diff)
downloadbusybox-w32-613d1366341793b382f63572d472016c1ad7b5a0.tar.gz
busybox-w32-613d1366341793b382f63572d472016c1ad7b5a0.tar.bz2
busybox-w32-613d1366341793b382f63572d472016c1ad7b5a0.zip
Vodz' last_patch57:
Hi, Erik. my_getpw(uid/gid) and applets used it have problem: if username for uid not found, applets can`t detect it (but code pessent). Also "%8ld " format is bad: spaces not required (applets have self format or spec format (tar applet) and overflow for "id" applet...) This problem also pressent in stable version. Patch for unstable in attach. --w vodz git-svn-id: svn://busybox.net/trunk/busybox@5613 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'procps')
-rw-r--r--procps/ps.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/procps/ps.c b/procps/ps.c
index aa408604a..6036ffc1e 100644
--- a/procps/ps.c
+++ b/procps/ps.c
@@ -150,8 +150,6 @@ extern int ps_main(int argc, char **argv)
150 150
151 /* Make some adjustments as needed */ 151 /* Make some adjustments as needed */
152 my_getpwuid(uidName, p.ruid); 152 my_getpwuid(uidName, p.ruid);
153 if (*uidName == '\0')
154 sprintf(uidName, "%d", p.ruid);
155 153
156 sprintf(path, "/proc/%s/cmdline", entry->d_name); 154 sprintf(path, "/proc/%s/cmdline", entry->d_name);
157 file = fopen(path, "r"); 155 file = fopen(path, "r");
@@ -243,8 +241,6 @@ extern int ps_main(int argc, char **argv)
243 241
244 /* Make some adjustments as needed */ 242 /* Make some adjustments as needed */
245 my_getpwuid(uidName, info.euid); 243 my_getpwuid(uidName, info.euid);
246 if (*uidName == '\0')
247 sprintf(uidName, "%ld", info.euid);
248 244
249 if(p.vmsize == 0) 245 if(p.vmsize == 0)
250 len = printf("%5d %-8s %c ", p.pid, uidName, p.state); 246 len = printf("%5d %-8s %c ", p.pid, uidName, p.state);