diff options
Diffstat (limited to 'ps.c')
-rw-r--r-- | ps.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -99,20 +99,20 @@ static void parse_proc_status(char *S, proc_t * P) | |||
99 | if (tmp) | 99 | if (tmp) |
100 | sscanf(tmp, "Pid:\t%d\n" "PPid:\t%d\n", &P->pid, &P->ppid); | 100 | sscanf(tmp, "Pid:\t%d\n" "PPid:\t%d\n", &P->pid, &P->ppid); |
101 | else | 101 | else |
102 | error_msg("Internal error!\n"); | 102 | error_msg("Internal error!"); |
103 | 103 | ||
104 | /* For busybox, ignoring effective, saved, etc */ | 104 | /* For busybox, ignoring effective, saved, etc */ |
105 | tmp = strstr(S, "Uid:"); | 105 | tmp = strstr(S, "Uid:"); |
106 | if (tmp) | 106 | if (tmp) |
107 | sscanf(tmp, "Uid:\t%d", &P->ruid); | 107 | sscanf(tmp, "Uid:\t%d", &P->ruid); |
108 | else | 108 | else |
109 | error_msg("Internal error!\n"); | 109 | error_msg("Internal error!"); |
110 | 110 | ||
111 | tmp = strstr(S, "Gid:"); | 111 | tmp = strstr(S, "Gid:"); |
112 | if (tmp) | 112 | if (tmp) |
113 | sscanf(tmp, "Gid:\t%d", &P->rgid); | 113 | sscanf(tmp, "Gid:\t%d", &P->rgid); |
114 | else | 114 | else |
115 | error_msg("Internal error!\n"); | 115 | error_msg("Internal error!"); |
116 | 116 | ||
117 | } | 117 | } |
118 | 118 | ||
@@ -137,7 +137,7 @@ extern int ps_main(int argc, char **argv) | |||
137 | 137 | ||
138 | dir = opendir("/proc"); | 138 | dir = opendir("/proc"); |
139 | if (!dir) | 139 | if (!dir) |
140 | error_msg_and_die("Can't open /proc\n"); | 140 | error_msg_and_die("Can't open /proc"); |
141 | 141 | ||
142 | #ifdef BB_FEATURE_AUTOWIDTH | 142 | #ifdef BB_FEATURE_AUTOWIDTH |
143 | ioctl(fileno(stdout), TIOCGWINSZ, &win); | 143 | ioctl(fileno(stdout), TIOCGWINSZ, &win); |