diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2006-11-01 20:20:37 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2006-11-01 20:20:37 +0000 |
commit | dd539f76877000e333796da8f30ea760c080a69a (patch) | |
tree | 26f8642cd9e8cc1c2ca0b75a6b20801863b4e2cf | |
parent | 92258541449581302e180d05e827e27d35030a18 (diff) | |
download | busybox-w32-dd539f76877000e333796da8f30ea760c080a69a.tar.gz busybox-w32-dd539f76877000e333796da8f30ea760c080a69a.tar.bz2 busybox-w32-dd539f76877000e333796da8f30ea760c080a69a.zip |
Unneeded code removed, usused field "unsigned pscpu" removed
-rw-r--r-- | include/libbb.h | 7 | ||||
-rw-r--r-- | libbb/procps.c | 8 | ||||
-rw-r--r-- | procps/kill.c | 7 | ||||
-rw-r--r-- | procps/ps.c | 4 | ||||
-rw-r--r-- | util-linux/hwclock.c | 2 |
5 files changed, 14 insertions, 14 deletions
diff --git a/include/libbb.h b/include/libbb.h index 343a93290..3ef1af1ab 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -501,13 +501,12 @@ void reset_ino_dev_hashtable(void); | |||
501 | #endif | 501 | #endif |
502 | #endif | 502 | #endif |
503 | typedef struct { | 503 | typedef struct { |
504 | pid_t pid, ppid; | 504 | int pid, ppid; |
505 | char user[9]; | 505 | char user[9]; |
506 | char state[4]; | 506 | char state[4]; |
507 | unsigned long rss; | 507 | unsigned long rss; |
508 | #ifdef CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE | 508 | #ifdef CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE |
509 | unsigned pcpu; | 509 | unsigned pcpu; |
510 | unsigned pscpu; | ||
511 | unsigned long stime, utime; | 510 | unsigned long stime, utime; |
512 | #endif | 511 | #endif |
513 | char *cmd; | 512 | char *cmd; |
@@ -525,7 +524,7 @@ extern const char bb_uuenc_tbl_base64[]; | |||
525 | extern const char bb_uuenc_tbl_std[]; | 524 | extern const char bb_uuenc_tbl_std[]; |
526 | void bb_uuencode(const unsigned char *s, char *store, const int length, const char *tbl); | 525 | void bb_uuencode(const unsigned char *s, char *store, const int length, const char *tbl); |
527 | 526 | ||
528 | typedef struct _sha1_ctx_t_ { | 527 | typedef struct sha1_ctx_t { |
529 | uint32_t count[2]; | 528 | uint32_t count[2]; |
530 | uint32_t hash[5]; | 529 | uint32_t hash[5]; |
531 | uint32_t wbuf[16]; | 530 | uint32_t wbuf[16]; |
@@ -534,7 +533,7 @@ void sha1_begin(sha1_ctx_t *ctx); | |||
534 | void sha1_hash(const void *data, size_t length, sha1_ctx_t *ctx); | 533 | void sha1_hash(const void *data, size_t length, sha1_ctx_t *ctx); |
535 | void *sha1_end(void *resbuf, sha1_ctx_t *ctx); | 534 | void *sha1_end(void *resbuf, sha1_ctx_t *ctx); |
536 | 535 | ||
537 | typedef struct _md5_ctx_t_ { | 536 | typedef struct md5_ctx_t { |
538 | uint32_t A; | 537 | uint32_t A; |
539 | uint32_t B; | 538 | uint32_t B; |
540 | uint32_t C; | 539 | uint32_t C; |
diff --git a/libbb/procps.c b/libbb/procps.c index 15a1cf74b..9d73fc4b7 100644 --- a/libbb/procps.c +++ b/libbb/procps.c | |||
@@ -36,13 +36,13 @@ procps_status_t * procps_scan(int save_user_arg0) | |||
36 | 36 | ||
37 | struct dirent *entry; | 37 | struct dirent *entry; |
38 | char *name; | 38 | char *name; |
39 | int n; | ||
40 | char status[32]; | ||
41 | char *status_tail; | ||
42 | char buf[PROCPS_BUFSIZE]; | 39 | char buf[PROCPS_BUFSIZE]; |
40 | char status[sizeof("/proc//cmdline") + sizeof(int)*3]; | ||
41 | char *status_tail; | ||
43 | procps_status_t curstatus; | 42 | procps_status_t curstatus; |
44 | int pid; | ||
45 | long tasknice; | 43 | long tasknice; |
44 | int pid; | ||
45 | int n; | ||
46 | struct stat sb; | 46 | struct stat sb; |
47 | 47 | ||
48 | if (!dir) { | 48 | if (!dir) { |
diff --git a/procps/kill.c b/procps/kill.c index f22bdbe46..1b31a7291 100644 --- a/procps/kill.c +++ b/procps/kill.c | |||
@@ -84,9 +84,10 @@ do_it_now: | |||
84 | pid_t sid; | 84 | pid_t sid; |
85 | procps_status_t* p; | 85 | procps_status_t* p; |
86 | 86 | ||
87 | /* kill(-1, sig) on Linux (at least 2.1.x) | 87 | // Cannot happen anyway? We don't TERM ourself, we STOP |
88 | * might send signal to the calling process too */ | 88 | // /* kill(-1, sig) on Linux (at least 2.1.x) |
89 | signal(SIGTERM, SIG_IGN); | 89 | // * might send signal to the calling process too */ |
90 | // signal(SIGTERM, SIG_IGN); | ||
90 | /* Now stop all processes */ | 91 | /* Now stop all processes */ |
91 | kill(-1, SIGSTOP); | 92 | kill(-1, SIGSTOP); |
92 | /* Find out our own session id */ | 93 | /* Find out our own session id */ |
diff --git a/procps/ps.c b/procps/ps.c index da8c2a346..92608b114 100644 --- a/procps/ps.c +++ b/procps/ps.c | |||
@@ -25,7 +25,7 @@ int ps_main(int argc, char **argv) | |||
25 | #if ENABLE_FEATURE_PS_WIDE || ENABLE_SELINUX | 25 | #if ENABLE_FEATURE_PS_WIDE || ENABLE_SELINUX |
26 | #if ENABLE_FEATURE_PS_WIDE | 26 | #if ENABLE_FEATURE_PS_WIDE |
27 | opt_complementary = "-:ww"; | 27 | opt_complementary = "-:ww"; |
28 | USE_SELINUX(i =) getopt32(argc, argv, "w" USE_SELINUX("c"), &w_count); | 28 | USE_SELINUX(i =) getopt32(argc, argv, USE_SELINUX("c") "w", &w_count); |
29 | /* if w is given once, GNU ps sets the width to 132, | 29 | /* if w is given once, GNU ps sets the width to 132, |
30 | * if w is given more than once, it is "unlimited" | 30 | * if w is given more than once, it is "unlimited" |
31 | */ | 31 | */ |
@@ -40,7 +40,7 @@ int ps_main(int argc, char **argv) | |||
40 | i = getopt32(argc, argv, "c"); | 40 | i = getopt32(argc, argv, "c"); |
41 | #endif | 41 | #endif |
42 | #if ENABLE_SELINUX | 42 | #if ENABLE_SELINUX |
43 | if ((i & (1+ENABLE_FEATURE_PS_WIDE)) && is_selinux_enabled()) | 43 | if ((i & 1) && is_selinux_enabled()) |
44 | use_selinux = 1; | 44 | use_selinux = 1; |
45 | #endif | 45 | #endif |
46 | #endif /* ENABLE_FEATURE_PS_WIDE || ENABLE_SELINUX */ | 46 | #endif /* ENABLE_FEATURE_PS_WIDE || ENABLE_SELINUX */ |
diff --git a/util-linux/hwclock.c b/util-linux/hwclock.c index 3a087725e..8fcd8c99c 100644 --- a/util-linux/hwclock.c +++ b/util-linux/hwclock.c | |||
@@ -106,7 +106,7 @@ static int show_clock(int utc) | |||
106 | if (buffer[0]) | 106 | if (buffer[0]) |
107 | buffer[strlen(buffer) - 1] = 0; | 107 | buffer[strlen(buffer) - 1] = 0; |
108 | 108 | ||
109 | //printf("%s %.6f seconds %s\n", buffer, 0.0, utc ? "" : (ptm->tm_isdst ? tzname [1] : tzname [0])); | 109 | //printf("%s %.6f seconds %s\n", buffer, 0.0, utc ? "" : (ptm->tm_isdst ? tzname[1] : tzname[0])); |
110 | printf( "%s %.6f seconds\n", buffer, 0.0); | 110 | printf( "%s %.6f seconds\n", buffer, 0.0); |
111 | RELEASE_CONFIG_BUFFER(buffer); | 111 | RELEASE_CONFIG_BUFFER(buffer); |
112 | 112 | ||