svn commit: trunk/busybox: include libbb procps util-linux
vda at busybox.net
vda at busybox.net
Wed Nov 1 12:20:38 PST 2006
Author: vda
Date: 2006-11-01 12:20:37 -0800 (Wed, 01 Nov 2006)
New Revision: 16488
Log:
Unneeded code removed, usused field "unsigned pscpu" removed
Modified:
trunk/busybox/include/libbb.h
trunk/busybox/libbb/procps.c
trunk/busybox/procps/kill.c
trunk/busybox/procps/ps.c
trunk/busybox/util-linux/hwclock.c
Changeset:
Modified: trunk/busybox/include/libbb.h
===================================================================
--- trunk/busybox/include/libbb.h 2006-11-01 10:25:35 UTC (rev 16487)
+++ trunk/busybox/include/libbb.h 2006-11-01 20:20:37 UTC (rev 16488)
@@ -501,13 +501,12 @@
#endif
#endif
typedef struct {
- pid_t pid, ppid;
+ int pid, ppid;
char user[9];
char state[4];
unsigned long rss;
#ifdef CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE
unsigned pcpu;
- unsigned pscpu;
unsigned long stime, utime;
#endif
char *cmd;
@@ -525,7 +524,7 @@
extern const char bb_uuenc_tbl_std[];
void bb_uuencode(const unsigned char *s, char *store, const int length, const char *tbl);
-typedef struct _sha1_ctx_t_ {
+typedef struct sha1_ctx_t {
uint32_t count[2];
uint32_t hash[5];
uint32_t wbuf[16];
@@ -534,7 +533,7 @@
void sha1_hash(const void *data, size_t length, sha1_ctx_t *ctx);
void *sha1_end(void *resbuf, sha1_ctx_t *ctx);
-typedef struct _md5_ctx_t_ {
+typedef struct md5_ctx_t {
uint32_t A;
uint32_t B;
uint32_t C;
Modified: trunk/busybox/libbb/procps.c
===================================================================
--- trunk/busybox/libbb/procps.c 2006-11-01 10:25:35 UTC (rev 16487)
+++ trunk/busybox/libbb/procps.c 2006-11-01 20:20:37 UTC (rev 16488)
@@ -36,13 +36,13 @@
struct dirent *entry;
char *name;
- int n;
- char status[32];
+ char buf[PROCPS_BUFSIZE];
+ char status[sizeof("/proc//cmdline") + sizeof(int)*3];
char *status_tail;
- char buf[PROCPS_BUFSIZE];
procps_status_t curstatus;
+ long tasknice;
int pid;
- long tasknice;
+ int n;
struct stat sb;
if (!dir) {
Modified: trunk/busybox/procps/kill.c
===================================================================
--- trunk/busybox/procps/kill.c 2006-11-01 10:25:35 UTC (rev 16487)
+++ trunk/busybox/procps/kill.c 2006-11-01 20:20:37 UTC (rev 16488)
@@ -84,9 +84,10 @@
pid_t sid;
procps_status_t* p;
- /* kill(-1, sig) on Linux (at least 2.1.x)
- * might send signal to the calling process too */
- signal(SIGTERM, SIG_IGN);
+// Cannot happen anyway? We don't TERM ourself, we STOP
+// /* kill(-1, sig) on Linux (at least 2.1.x)
+// * might send signal to the calling process too */
+// signal(SIGTERM, SIG_IGN);
/* Now stop all processes */
kill(-1, SIGSTOP);
/* Find out our own session id */
Modified: trunk/busybox/procps/ps.c
===================================================================
--- trunk/busybox/procps/ps.c 2006-11-01 10:25:35 UTC (rev 16487)
+++ trunk/busybox/procps/ps.c 2006-11-01 20:20:37 UTC (rev 16488)
@@ -25,7 +25,7 @@
#if ENABLE_FEATURE_PS_WIDE || ENABLE_SELINUX
#if ENABLE_FEATURE_PS_WIDE
opt_complementary = "-:ww";
- USE_SELINUX(i =) getopt32(argc, argv, "w" USE_SELINUX("c"), &w_count);
+ USE_SELINUX(i =) getopt32(argc, argv, USE_SELINUX("c") "w", &w_count);
/* if w is given once, GNU ps sets the width to 132,
* if w is given more than once, it is "unlimited"
*/
@@ -40,7 +40,7 @@
i = getopt32(argc, argv, "c");
#endif
#if ENABLE_SELINUX
- if ((i & (1+ENABLE_FEATURE_PS_WIDE)) && is_selinux_enabled())
+ if ((i & 1) && is_selinux_enabled())
use_selinux = 1;
#endif
#endif /* ENABLE_FEATURE_PS_WIDE || ENABLE_SELINUX */
Modified: trunk/busybox/util-linux/hwclock.c
===================================================================
--- trunk/busybox/util-linux/hwclock.c 2006-11-01 10:25:35 UTC (rev 16487)
+++ trunk/busybox/util-linux/hwclock.c 2006-11-01 20:20:37 UTC (rev 16488)
@@ -106,7 +106,7 @@
if (buffer[0])
buffer[strlen(buffer) - 1] = 0;
- //printf("%s %.6f seconds %s\n", buffer, 0.0, utc ? "" : (ptm->tm_isdst ? tzname [1] : tzname [0]));
+ //printf("%s %.6f seconds %s\n", buffer, 0.0, utc ? "" : (ptm->tm_isdst ? tzname[1] : tzname[0]));
printf( "%s %.6f seconds\n", buffer, 0.0);
RELEASE_CONFIG_BUFFER(buffer);
More information about the busybox-cvs
mailing list