aboutsummaryrefslogtreecommitdiff
path: root/procps
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-08-12 20:58:27 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-08-12 20:58:27 +0000
commit6ca409e0e4c198fe3081346eebbae3f068fe605a (patch)
tree060cb05d99220a1eda399194d1209c269f0e8cd8 /procps
parent4185548984357df91311f30c8e43d95f33922576 (diff)
downloadbusybox-w32-6ca409e0e4c198fe3081346eebbae3f068fe605a.tar.gz
busybox-w32-6ca409e0e4c198fe3081346eebbae3f068fe605a.tar.bz2
busybox-w32-6ca409e0e4c198fe3081346eebbae3f068fe605a.zip
trylink: produce even more info about final link stage
trylink: explain how to modify link and drastically decrease amount of padding (unfortunately, needs hand editing ATM). *: add ALIGN1 / ALIGN2 to global strings and arrays of bytes and shorts size saving: 0.5k
Diffstat (limited to 'procps')
-rw-r--r--procps/nmeter.c6
-rw-r--r--procps/renice.c7
-rw-r--r--procps/sysctl.c25
3 files changed, 21 insertions, 17 deletions
diff --git a/procps/nmeter.c b/procps/nmeter.c
index 4f78a1489..127a3d1c1 100644
--- a/procps/nmeter.c
+++ b/procps/nmeter.c
@@ -36,7 +36,7 @@ static const char *const proc_name[] = {
36 "net/dev", 36 "net/dev",
37 "meminfo", 37 "meminfo",
38 "diskstats", 38 "diskstats",
39 "sys/fs/file-nr", 39 "sys/fs/file-nr"
40}; 40};
41 41
42struct globals { 42struct globals {
@@ -754,7 +754,7 @@ static void collect_info(s_stat *s)
754 754
755typedef s_stat* init_func(const char *param); 755typedef s_stat* init_func(const char *param);
756 756
757static const char options[] = "ncmsfixptbdr"; 757static const char options[] ALIGN1 = "ncmsfixptbdr";
758static init_func *const init_functions[] = { 758static init_func *const init_functions[] = {
759 init_if, 759 init_if,
760 init_cpu, 760 init_cpu,
@@ -767,7 +767,7 @@ static init_func *const init_functions[] = {
767 init_time, 767 init_time,
768 init_blk, 768 init_blk,
769 init_delay, 769 init_delay,
770 init_cr, 770 init_cr
771}; 771};
772 772
773int nmeter_main(int argc, char **argv); 773int nmeter_main(int argc, char **argv);
diff --git a/procps/renice.c b/procps/renice.c
index 6c5bb0e20..b2a9ed72e 100644
--- a/procps/renice.c
+++ b/procps/renice.c
@@ -29,7 +29,7 @@ void BUG_bad_PRIO_USER(void);
29int renice_main(int argc, char **argv); 29int renice_main(int argc, char **argv);
30int renice_main(int argc, char **argv) 30int renice_main(int argc, char **argv)
31{ 31{
32 static const char Xetpriority_msg[] = "%cetpriority"; 32 static const char Xetpriority_msg[] ALIGN1 = "%cetpriority";
33 33
34 int retval = EXIT_SUCCESS; 34 int retval = EXIT_SUCCESS;
35 int which = PRIO_PROCESS; /* Default 'which' value. */ 35 int which = PRIO_PROCESS; /* Default 'which' value. */
@@ -67,8 +67,9 @@ int renice_main(int argc, char **argv)
67 while ((arg = *++argv) != NULL) { 67 while ((arg = *++argv) != NULL) {
68 /* Check for a mode switch. */ 68 /* Check for a mode switch. */
69 if (arg[0] == '-' && arg[1]) { 69 if (arg[0] == '-' && arg[1]) {
70 static const char opts[] 70 static const char opts[] ALIGN1 = {
71 = { 'p', 'g', 'u', 0, PRIO_PROCESS, PRIO_PGRP, PRIO_USER }; 71 'p', 'g', 'u', 0, PRIO_PROCESS, PRIO_PGRP, PRIO_USER
72 };
72 const char *p = strchr(opts, arg[1]); 73 const char *p = strchr(opts, arg[1]);
73 if (p) { 74 if (p) {
74 which = p[4]; 75 which = p[4];
diff --git a/procps/sysctl.c b/procps/sysctl.c
index a0e9e16e5..5100f57e7 100644
--- a/procps/sysctl.c
+++ b/procps/sysctl.c
@@ -27,24 +27,27 @@ static int sysctl_display_all(const char *path, int output, int show_table);
27/* 27/*
28 * Globals... 28 * Globals...
29 */ 29 */
30static const char PROC_PATH[] = "/proc/sys/"; 30static const char PROC_PATH[] ALIGN1 = "/proc/sys/";
31static const char DEFAULT_PRELOAD[] = "/etc/sysctl.conf"; 31static const char DEFAULT_PRELOAD[] ALIGN1 = "/etc/sysctl.conf";
32 32
33/* error messages */ 33/* error messages */
34static const char ERR_UNKNOWN_PARAMETER[] = "error: Unknown parameter '%s'\n"; 34static const char ERR_UNKNOWN_PARAMETER[] ALIGN1 =
35static const char ERR_MALFORMED_SETTING[] = "error: Malformed setting '%s'\n"; 35 "error: Unknown parameter '%s'\n";
36static const char ERR_NO_EQUALS[] = 36static const char ERR_MALFORMED_SETTING[] ALIGN1 =
37 "error: Malformed setting '%s'\n";
38static const char ERR_NO_EQUALS[] ALIGN1 =
37 "error: '%s' must be of the form name=value\n"; 39 "error: '%s' must be of the form name=value\n";
38static const char ERR_INVALID_KEY[] = "error: '%s' is an unknown key\n"; 40static const char ERR_INVALID_KEY[] ALIGN1 =
39static const char ERR_UNKNOWN_WRITING[] = 41 "error: '%s' is an unknown key\n";
42static const char ERR_UNKNOWN_WRITING[] ALIGN1 =
40 "error: unknown error %d setting key '%s'\n"; 43 "error: unknown error %d setting key '%s'\n";
41static const char ERR_UNKNOWN_READING[] = 44static const char ERR_UNKNOWN_READING[] ALIGN1 =
42 "error: unknown error %d reading key '%s'\n"; 45 "error: unknown error %d reading key '%s'\n";
43static const char ERR_PERMISSION_DENIED[] = 46static const char ERR_PERMISSION_DENIED[] ALIGN1 =
44 "error: permission denied on key '%s'\n"; 47 "error: permission denied on key '%s'\n";
45static const char ERR_PRELOAD_FILE[] = 48static const char ERR_PRELOAD_FILE[] ALIGN1 =
46 "error: cannot open preload file '%s'\n"; 49 "error: cannot open preload file '%s'\n";
47static const char WARN_BAD_LINE[] = 50static const char WARN_BAD_LINE[] ALIGN1 =
48 "warning: %s(%d): invalid syntax, continuing...\n"; 51 "warning: %s(%d): invalid syntax, continuing...\n";
49 52
50 53