aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2013-01-14 01:34:48 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2013-01-14 01:34:48 +0100
commit6967578728a3eef43b7b2be4080dafc1b87f528d (patch)
tree76b79c4c81ce8e5ad4e57df5119efecef810e673
parent52185155088d0910d29c7f4fdf5cb3eecaac8965 (diff)
downloadbusybox-w32-6967578728a3eef43b7b2be4080dafc1b87f528d.tar.gz
busybox-w32-6967578728a3eef43b7b2be4080dafc1b87f528d.tar.bz2
busybox-w32-6967578728a3eef43b7b2be4080dafc1b87f528d.zip
whitespace fixes. no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--archival/dpkg.c6
-rw-r--r--archival/gzip.c16
-rw-r--r--archival/lzop.c2
-rw-r--r--archival/tar.c14
-rw-r--r--console-tools/setlogcons.c7
-rw-r--r--coreutils/cal.c4
-rw-r--r--coreutils/cut.c2
-rw-r--r--coreutils/df.c4
-rw-r--r--coreutils/id.c2
-rw-r--r--coreutils/ls.c4
-rw-r--r--coreutils/md5_sha1_sum.c2
-rw-r--r--e2fsprogs/fsck.c4
-rw-r--r--findutils/find.c4
-rw-r--r--miscutils/fbsplash.c2
-rw-r--r--miscutils/last.c4
-rw-r--r--modutils/depmod.c6
-rw-r--r--networking/arp.c14
-rw-r--r--networking/ether-wake.c6
-rw-r--r--networking/httpd.c6
-rw-r--r--networking/httpd_ssi.c2
-rw-r--r--networking/ifconfig.c2
-rw-r--r--networking/interface.c29
-rw-r--r--networking/nc.c2
-rw-r--r--networking/ntpd.c11
-rw-r--r--networking/ntpd_simple.c2
-rw-r--r--networking/ping.c2
-rw-r--r--networking/route.c14
-rw-r--r--procps/powertop.c2
-rw-r--r--procps/sysctl.c2
-rw-r--r--sysklogd/syslogd.c2
-rw-r--r--util-linux/fdformat.c2
-rw-r--r--util-linux/fdisk.c2
-rw-r--r--util-linux/flock.c2
-rw-r--r--util-linux/ipcrm.c6
-rw-r--r--util-linux/ipcs.c254
-rw-r--r--util-linux/lspci.c6
-rw-r--r--util-linux/mount.c48
-rw-r--r--util-linux/readprofile.c16
-rw-r--r--util-linux/volume_id/linux_raid.c6
-rw-r--r--util-linux/volume_id/util.c2
40 files changed, 261 insertions, 262 deletions
diff --git a/archival/dpkg.c b/archival/dpkg.c
index dae8a9747..ed86f3355 100644
--- a/archival/dpkg.c
+++ b/archival/dpkg.c
@@ -1026,8 +1026,8 @@ static int check_deps(deb_file_t **deb_file, int deb_start /*, int dep_max_count
1026 if (package_edge->type == EDGE_CONFLICTS) { 1026 if (package_edge->type == EDGE_CONFLICTS) {
1027 const unsigned package_num = 1027 const unsigned package_num =
1028 search_package_hashtable(package_edge->name, 1028 search_package_hashtable(package_edge->name,
1029 package_edge->version, 1029 package_edge->version,
1030 package_edge->operator); 1030 package_edge->operator);
1031 int result = 0; 1031 int result = 0;
1032 if (package_hashtable[package_num] != NULL) { 1032 if (package_hashtable[package_num] != NULL) {
1033 status_num = search_status_hashtable(name_hashtable[package_hashtable[package_num]->name]); 1033 status_num = search_status_hashtable(name_hashtable[package_hashtable[package_num]->name]);
@@ -1114,7 +1114,7 @@ static int check_deps(deb_file_t **deb_file, int deb_start /*, int dep_max_count
1114 */ 1114 */
1115 if (root_of_alternatives && package_edge->type != root_of_alternatives->type - 1) 1115 if (root_of_alternatives && package_edge->type != root_of_alternatives->type - 1)
1116 bb_error_msg_and_die("fatal error, package dependencies corrupt: %d != %d - 1", 1116 bb_error_msg_and_die("fatal error, package dependencies corrupt: %d != %d - 1",
1117 package_edge->type, root_of_alternatives->type); 1117 package_edge->type, root_of_alternatives->type);
1118 1118
1119 if (package_hashtable[package_num] != NULL) 1119 if (package_hashtable[package_num] != NULL)
1120 result = !package_satisfies_dependency(package_num, package_edge->type); 1120 result = !package_satisfies_dependency(package_num, package_edge->type);
diff --git a/archival/gzip.c b/archival/gzip.c
index 80db4f969..31ccab3cd 100644
--- a/archival/gzip.c
+++ b/archival/gzip.c
@@ -1179,7 +1179,7 @@ static void gen_codes(ct_data * tree, int max_code)
1179 * must be all ones. 1179 * must be all ones.
1180 */ 1180 */
1181 Assert(code + G2.bl_count[MAX_BITS] - 1 == (1 << MAX_BITS) - 1, 1181 Assert(code + G2.bl_count[MAX_BITS] - 1 == (1 << MAX_BITS) - 1,
1182 "inconsistent bit counts"); 1182 "inconsistent bit counts");
1183 Tracev((stderr, "\ngen_codes: max_code %d ", max_code)); 1183 Tracev((stderr, "\ngen_codes: max_code %d ", max_code));
1184 1184
1185 for (n = 0; n <= max_code; n++) { 1185 for (n = 0; n <= max_code; n++) {
@@ -1527,9 +1527,9 @@ static int ct_tally(int dist, int lc)
1527 } 1527 }
1528 out_length >>= 3; 1528 out_length >>= 3;
1529 Trace((stderr, 1529 Trace((stderr,
1530 "\nlast_lit %u, last_dist %u, in %ld, out ~%ld(%ld%%) ", 1530 "\nlast_lit %u, last_dist %u, in %ld, out ~%ld(%ld%%) ",
1531 G2.last_lit, G2.last_dist, in_length, out_length, 1531 G2.last_lit, G2.last_dist, in_length, out_length,
1532 100L - out_length * 100L / in_length)); 1532 100L - out_length * 100L / in_length));
1533 if (G2.last_dist < G2.last_lit / 2 && out_length < in_length / 2) 1533 if (G2.last_dist < G2.last_lit / 2 && out_length < in_length / 2)
1534 return 1; 1534 return 1;
1535 } 1535 }
@@ -1621,9 +1621,9 @@ static ulg flush_block(char *buf, ulg stored_len, int eof)
1621 static_lenb = (G2.static_len + 3 + 7) >> 3; 1621 static_lenb = (G2.static_len + 3 + 7) >> 3;
1622 1622
1623 Trace((stderr, 1623 Trace((stderr,
1624 "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u dist %u ", 1624 "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u dist %u ",
1625 opt_lenb, G2.opt_len, static_lenb, G2.static_len, stored_len, 1625 opt_lenb, G2.opt_len, static_lenb, G2.static_len, stored_len,
1626 G2.last_lit, G2.last_dist)); 1626 G2.last_lit, G2.last_dist));
1627 1627
1628 if (static_lenb <= opt_lenb) 1628 if (static_lenb <= opt_lenb)
1629 opt_lenb = static_lenb; 1629 opt_lenb = static_lenb;
@@ -1661,7 +1661,7 @@ static ulg flush_block(char *buf, ulg stored_len, int eof)
1661 } else { 1661 } else {
1662 send_bits((DYN_TREES << 1) + eof, 3); 1662 send_bits((DYN_TREES << 1) + eof, 3);
1663 send_all_trees(G2.l_desc.max_code + 1, G2.d_desc.max_code + 1, 1663 send_all_trees(G2.l_desc.max_code + 1, G2.d_desc.max_code + 1,
1664 max_blindex + 1); 1664 max_blindex + 1);
1665 compress_block((ct_data *) G2.dyn_ltree, (ct_data *) G2.dyn_dtree); 1665 compress_block((ct_data *) G2.dyn_ltree, (ct_data *) G2.dyn_dtree);
1666 G2.compressed_len += 3 + G2.opt_len; 1666 G2.compressed_len += 3 + G2.opt_len;
1667 } 1667 }
diff --git a/archival/lzop.c b/archival/lzop.c
index fbe08417d..ec4e784ed 100644
--- a/archival/lzop.c
+++ b/archival/lzop.c
@@ -350,7 +350,7 @@ static NOINLINE int lzo1x_optimize(uint8_t *in, unsigned in_len,
350// LZO_UNUSED(o_m3_a); LZO_UNUSED(o_m3_b); 350// LZO_UNUSED(o_m3_a); LZO_UNUSED(o_m3_b);
351 *out_len = pd(op, out); 351 *out_len = pd(op, out);
352 return (ip == ip_end ? LZO_E_OK : 352 return (ip == ip_end ? LZO_E_OK :
353 (ip < ip_end ? LZO_E_INPUT_NOT_CONSUMED : LZO_E_INPUT_OVERRUN)); 353 (ip < ip_end ? LZO_E_INPUT_NOT_CONSUMED : LZO_E_INPUT_OVERRUN));
354} 354}
355 355
356/**********************************************************************/ 356/**********************************************************************/
diff --git a/archival/tar.c b/archival/tar.c
index a3565d6ae..f46f7bb7a 100644
--- a/archival/tar.c
+++ b/archival/tar.c
@@ -333,13 +333,13 @@ static int writeTarHeader(struct TarBallInfo *tbInfo,
333 && (filesize <= 0x3fffffffffffffffffffffffLL) 333 && (filesize <= 0x3fffffffffffffffffffffffLL)
334#endif 334#endif
335 ) { 335 ) {
336 /* GNU tar uses "base-256 encoding" for very large numbers. 336 /* GNU tar uses "base-256 encoding" for very large numbers.
337 * Encoding is binary, with highest bit always set as a marker 337 * Encoding is binary, with highest bit always set as a marker
338 * and sign in next-highest bit: 338 * and sign in next-highest bit:
339 * 80 00 .. 00 - zero 339 * 80 00 .. 00 - zero
340 * bf ff .. ff - largest positive number 340 * bf ff .. ff - largest positive number
341 * ff ff .. ff - minus 1 341 * ff ff .. ff - minus 1
342 * c0 00 .. 00 - smallest negative number 342 * c0 00 .. 00 - smallest negative number
343 */ 343 */
344 char *p8 = header.size + sizeof(header.size); 344 char *p8 = header.size + sizeof(header.size);
345 do { 345 do {
diff --git a/console-tools/setlogcons.c b/console-tools/setlogcons.c
index 83a895407..c76a5a42b 100644
--- a/console-tools/setlogcons.c
+++ b/console-tools/setlogcons.c
@@ -22,9 +22,10 @@ int setlogcons_main(int argc UNUSED_PARAM, char **argv)
22 struct { 22 struct {
23 char fn; 23 char fn;
24 char subarg; 24 char subarg;
25 } arg = { 11, /* redirect kernel messages */ 25 } arg = {
26 0 /* to specified console (current as default) */ 26 11, /* redirect kernel messages */
27 }; 27 0 /* to specified console (current as default) */
28 };
28 29
29 if (argv[1]) 30 if (argv[1])
30 arg.subarg = xatou_range(argv[1], 0, 63); 31 arg.subarg = xatou_range(argv[1], 0, 63);
diff --git a/coreutils/cal.c b/coreutils/cal.c
index b470ad968..158b23fbc 100644
--- a/coreutils/cal.c
+++ b/coreutils/cal.c
@@ -167,8 +167,8 @@ int cal_main(int argc UNUSED_PARAM, char **argv)
167 day_array(month, year, dp); 167 day_array(month, year, dp);
168 len = sprintf(lineout, "%s %d", month_names[month - 1], year); 168 len = sprintf(lineout, "%s %d", month_names[month - 1], year);
169 printf("%*s%s\n%s\n", 169 printf("%*s%s\n%s\n",
170 ((7*julian + WEEK_LEN) - len) / 2, "", 170 ((7*julian + WEEK_LEN) - len) / 2, "",
171 lineout, day_headings); 171 lineout, day_headings);
172 for (row = 0; row < 6; row++) { 172 for (row = 0; row < 6; row++) {
173 build_row(lineout, dp)[0] = '\0'; 173 build_row(lineout, dp)[0] = '\0';
174 dp += 7; 174 dp += 7;
diff --git a/coreutils/cut.c b/coreutils/cut.c
index 2c27b704f..84449c775 100644
--- a/coreutils/cut.c
+++ b/coreutils/cut.c
@@ -212,7 +212,7 @@ int cut_main(int argc UNUSED_PARAM, char **argv)
212 if (opt & CUT_OPT_SUPPRESS_FLGS) { 212 if (opt & CUT_OPT_SUPPRESS_FLGS) {
213 bb_error_msg_and_die 213 bb_error_msg_and_die
214 ("suppressing non-delimited lines makes sense%s", 214 ("suppressing non-delimited lines makes sense%s",
215 _op_on_field); 215 _op_on_field);
216 } 216 }
217 if (delim != '\t') { 217 if (delim != '\t') {
218 bb_error_msg_and_die 218 bb_error_msg_and_die
diff --git a/coreutils/df.c b/coreutils/df.c
index 63dbd61bd..2c72e82a4 100644
--- a/coreutils/df.c
+++ b/coreutils/df.c
@@ -112,7 +112,7 @@ int df_main(int argc UNUSED_PARAM, char **argv)
112 /* From the manpage of df from coreutils-6.10: 112 /* From the manpage of df from coreutils-6.10:
113 Disk space is shown in 1K blocks by default, unless the environment 113 Disk space is shown in 1K blocks by default, unless the environment
114 variable POSIXLY_CORRECT is set, in which case 512-byte blocks are used. 114 variable POSIXLY_CORRECT is set, in which case 512-byte blocks are used.
115 */ 115 */
116 if (getenv("POSIXLY_CORRECT")) /* TODO - a new libbb function? */ 116 if (getenv("POSIXLY_CORRECT")) /* TODO - a new libbb function? */
117 df_disp_hr = 512; 117 df_disp_hr = 512;
118 118
@@ -221,7 +221,7 @@ int df_main(int argc UNUSED_PARAM, char **argv)
221 } 221 }
222#else 222#else
223 if (printf("\n%-20s" + 1, device) > 20 && !(opt & OPT_POSIX)) 223 if (printf("\n%-20s" + 1, device) > 20 && !(opt & OPT_POSIX))
224 printf("\n%-20s", ""); 224 printf("\n%-20s", "");
225#endif 225#endif
226 226
227#if ENABLE_FEATURE_HUMAN_READABLE 227#if ENABLE_FEATURE_HUMAN_READABLE
diff --git a/coreutils/id.c b/coreutils/id.c
index 399d25e34..1f20b755e 100644
--- a/coreutils/id.c
+++ b/coreutils/id.c
@@ -174,7 +174,7 @@ int id_main(int argc UNUSED_PARAM, char **argv)
174 /* Don't allow -n -r -nr -ug -rug -nug -rnug -uZ -gZ -GZ*/ 174 /* Don't allow -n -r -nr -ug -rug -nug -rnug -uZ -gZ -GZ*/
175 /* Don't allow more than one username */ 175 /* Don't allow more than one username */
176 opt_complementary = "?1:u--g:g--u:G--u:u--G:g--G:G--g:r?ugG:n?ugG" 176 opt_complementary = "?1:u--g:g--u:G--u:u--G:g--G:G--g:r?ugG:n?ugG"
177 IF_SELINUX(":u--Z:Z--u:g--Z:Z--g:G--Z:Z--G"); 177 IF_SELINUX(":u--Z:Z--u:g--Z:Z--g:G--Z:Z--G");
178 opt = getopt32(argv, "rnugG" IF_SELINUX("Z")); 178 opt = getopt32(argv, "rnugG" IF_SELINUX("Z"));
179 } 179 }
180 180
diff --git a/coreutils/ls.c b/coreutils/ls.c
index d5b25ee70..166473d4d 100644
--- a/coreutils/ls.c
+++ b/coreutils/ls.c
@@ -260,7 +260,7 @@ enum {
260 260
261/* TODO: simple toggles may be stored as OPT_xxx bits instead */ 261/* TODO: simple toggles may be stored as OPT_xxx bits instead */
262static const uint32_t opt_flags[] = { 262static const uint32_t opt_flags[] = {
263 STYLE_COLUMNAR, /* C */ 263 STYLE_COLUMNAR, /* C */
264 DISP_HIDDEN | DISP_DOT, /* a */ 264 DISP_HIDDEN | DISP_DOT, /* a */
265 DISP_NOLIST, /* d */ 265 DISP_NOLIST, /* d */
266 LIST_INO, /* i */ 266 LIST_INO, /* i */
@@ -720,7 +720,7 @@ static struct dnode *my_stat(const char *fullname, const char *name, int force_f
720 if ((option_mask32 & OPT_L) || force_follow) { 720 if ((option_mask32 & OPT_L) || force_follow) {
721#if ENABLE_SELINUX 721#if ENABLE_SELINUX
722 if (is_selinux_enabled()) { 722 if (is_selinux_enabled()) {
723 getfilecon(fullname, &cur->sid); 723 getfilecon(fullname, &cur->sid);
724 } 724 }
725#endif 725#endif
726 if (stat(fullname, &statbuf)) { 726 if (stat(fullname, &statbuf)) {
diff --git a/coreutils/md5_sha1_sum.c b/coreutils/md5_sha1_sum.c
index 2cb6dd43c..59b520fce 100644
--- a/coreutils/md5_sha1_sum.c
+++ b/coreutils/md5_sha1_sum.c
@@ -223,7 +223,7 @@ int md5_sha1_sum_main(int argc UNUSED_PARAM, char **argv)
223 } 223 }
224 if (count_failed && !(flags & FLAG_SILENT)) { 224 if (count_failed && !(flags & FLAG_SILENT)) {
225 bb_error_msg("WARNING: %d of %d computed checksums did NOT match", 225 bb_error_msg("WARNING: %d of %d computed checksums did NOT match",
226 count_failed, count_total); 226 count_failed, count_total);
227 } 227 }
228 fclose_if_not_stdin(pre_computed_stream); 228 fclose_if_not_stdin(pre_computed_stream);
229 } else { 229 } else {
diff --git a/e2fsprogs/fsck.c b/e2fsprogs/fsck.c
index 4b2f774f5..d32f396e9 100644
--- a/e2fsprogs/fsck.c
+++ b/e2fsprogs/fsck.c
@@ -478,7 +478,7 @@ static int wait_one(int flags)
478 instance_list = inst->next; 478 instance_list = inst->next;
479 if (verbose > 1) 479 if (verbose > 1)
480 printf("Finished with %s (exit status %d)\n", 480 printf("Finished with %s (exit status %d)\n",
481 inst->device, status); 481 inst->device, status);
482 num_running--; 482 num_running--;
483 free_instance(inst); 483 free_instance(inst);
484 484
@@ -844,7 +844,7 @@ static int check_all(void)
844 if (verbose > 1) 844 if (verbose > 1)
845 printf("--waiting-- (pass %d)\n", passno); 845 printf("--waiting-- (pass %d)\n", passno);
846 status |= wait_many(pass_done ? FLAG_WAIT_ALL : 846 status |= wait_many(pass_done ? FLAG_WAIT_ALL :
847 FLAG_WAIT_ATLEAST_ONE); 847 FLAG_WAIT_ATLEAST_ONE);
848 if (pass_done) { 848 if (pass_done) {
849 if (verbose > 1) 849 if (verbose > 1)
850 puts("----------------------------------"); 850 puts("----------------------------------");
diff --git a/findutils/find.c b/findutils/find.c
index b521e5b08..2235b5049 100644
--- a/findutils/find.c
+++ b/findutils/find.c
@@ -878,8 +878,8 @@ static action*** parse_params(char **argv)
878 IF_FEATURE_FIND_EXEC( "-exec\0" ) 878 IF_FEATURE_FIND_EXEC( "-exec\0" )
879 IF_FEATURE_FIND_PAREN( "(\0" ) 879 IF_FEATURE_FIND_PAREN( "(\0" )
880 /* All options/actions starting from here require argument */ 880 /* All options/actions starting from here require argument */
881 "-name\0" 881 "-name\0"
882 "-iname\0" 882 "-iname\0"
883 IF_FEATURE_FIND_PATH( "-path\0" ) 883 IF_FEATURE_FIND_PATH( "-path\0" )
884#if ENABLE_DESKTOP 884#if ENABLE_DESKTOP
885 IF_FEATURE_FIND_PATH( "-wholename\0") 885 IF_FEATURE_FIND_PATH( "-wholename\0")
diff --git a/miscutils/fbsplash.c b/miscutils/fbsplash.c
index 05a77da23..12a77b70f 100644
--- a/miscutils/fbsplash.c
+++ b/miscutils/fbsplash.c
@@ -150,7 +150,7 @@ static void fb_open(const char *strfb_device)
150 150
151 // map the device in memory 151 // map the device in memory
152 G.addr = mmap(NULL, 152 G.addr = mmap(NULL,
153 G.scr_var.yres * G.scr_fix.line_length, 153 G.scr_var.yres * G.scr_fix.line_length,
154 PROT_WRITE, MAP_SHARED, fbfd, 0); 154 PROT_WRITE, MAP_SHARED, fbfd, 0);
155 if (G.addr == MAP_FAILED) 155 if (G.addr == MAP_FAILED)
156 bb_perror_msg_and_die("mmap"); 156 bb_perror_msg_and_die("mmap");
diff --git a/miscutils/last.c b/miscutils/last.c
index d52780374..24f6e1c78 100644
--- a/miscutils/last.c
+++ b/miscutils/last.c
@@ -71,7 +71,7 @@ int last_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
71 file = xopen(bb_path_wtmp_file, O_RDONLY); 71 file = xopen(bb_path_wtmp_file, O_RDONLY);
72 72
73 printf("%-10s %-14s %-18s %-12.12s %s\n", 73 printf("%-10s %-14s %-18s %-12.12s %s\n",
74 "USER", "TTY", "HOST", "LOGIN", "TIME"); 74 "USER", "TTY", "HOST", "LOGIN", "TIME");
75 /* yikes. We reverse over the file and that is a not too elegant way */ 75 /* yikes. We reverse over the file and that is a not too elegant way */
76 pos = xlseek(file, 0, SEEK_END); 76 pos = xlseek(file, 0, SEEK_END);
77 pos = lseek(file, pos - sizeof(ut), SEEK_SET); 77 pos = lseek(file, pos - sizeof(ut), SEEK_SET);
@@ -131,7 +131,7 @@ int last_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
131 * but some systems have it wrong */ 131 * but some systems have it wrong */
132 t_tmp = (time_t)ut.ut_tv.tv_sec; 132 t_tmp = (time_t)ut.ut_tv.tv_sec;
133 printf("%-10s %-14s %-18s %-12.12s\n", 133 printf("%-10s %-14s %-18s %-12.12s\n",
134 ut.ut_user, ut.ut_line, ut.ut_host, ctime(&t_tmp) + 4); 134 ut.ut_user, ut.ut_line, ut.ut_host, ctime(&t_tmp) + 4);
135 next: 135 next:
136 pos -= sizeof(ut); 136 pos -= sizeof(ut);
137 if (pos <= 0) 137 if (pos <= 0)
diff --git a/modutils/depmod.c b/modutils/depmod.c
index 775236126..aa228ec85 100644
--- a/modutils/depmod.c
+++ b/modutils/depmod.c
@@ -31,7 +31,7 @@ typedef struct module_info {
31} module_info; 31} module_info;
32 32
33static int FAST_FUNC parse_module(const char *fname, struct stat *sb UNUSED_PARAM, 33static int FAST_FUNC parse_module(const char *fname, struct stat *sb UNUSED_PARAM,
34 void *data, int depth UNUSED_PARAM) 34 void *data, int depth UNUSED_PARAM)
35{ 35{
36 char modname[MODULE_NAME_LEN]; 36 char modname[MODULE_NAME_LEN];
37 module_info **first = (module_info **) data; 37 module_info **first = (module_info **) data;
@@ -95,7 +95,7 @@ static module_info *find_module(module_info *modules, const char *modname)
95} 95}
96 96
97static void order_dep_list(module_info *modules, module_info *start, 97static void order_dep_list(module_info *modules, module_info *start,
98 llist_t *add) 98 llist_t *add)
99{ 99{
100 module_info *m; 100 module_info *m;
101 llist_t *n; 101 llist_t *n;
@@ -216,7 +216,7 @@ int depmod_main(int argc UNUSED_PARAM, char **argv)
216 } while (*++argv); 216 } while (*++argv);
217 } else { 217 } else {
218 recursive_action(".", ACTION_RECURSE, 218 recursive_action(".", ACTION_RECURSE,
219 parse_module, NULL, &modules, 0); 219 parse_module, NULL, &modules, 0);
220 } 220 }
221 221
222 /* Generate dependency and alias files */ 222 /* Generate dependency and alias files */
diff --git a/networking/arp.c b/networking/arp.c
index 696c402e0..1c99987ae 100644
--- a/networking/arp.c
+++ b/networking/arp.c
@@ -214,7 +214,7 @@ static int arp_del(char **args)
214 214
215/* Get the hardware address to a specified interface name */ 215/* Get the hardware address to a specified interface name */
216static void arp_getdevhw(char *ifname, struct sockaddr *sa, 216static void arp_getdevhw(char *ifname, struct sockaddr *sa,
217 const struct hwtype *hwt) 217 const struct hwtype *hwt)
218{ 218{
219 struct ifreq ifr; 219 struct ifreq ifr;
220 const struct hwtype *xhw; 220 const struct hwtype *xhw;
@@ -233,8 +233,8 @@ static void arp_getdevhw(char *ifname, struct sockaddr *sa,
233 xhw = get_hwntype(-1); 233 xhw = get_hwntype(-1);
234 } 234 }
235 bb_error_msg("device '%s' has HW address %s '%s'", 235 bb_error_msg("device '%s' has HW address %s '%s'",
236 ifname, xhw->name, 236 ifname, xhw->name,
237 xhw->print((unsigned char *) &ifr.ifr_hwaddr.sa_data)); 237 xhw->print((unsigned char *) &ifr.ifr_hwaddr.sa_data));
238 } 238 }
239} 239}
240 240
@@ -345,7 +345,7 @@ static int arp_set(char **args)
345/* Print the contents of an ARP request block. */ 345/* Print the contents of an ARP request block. */
346static void 346static void
347arp_disp(const char *name, char *ip, int type, int arp_flags, 347arp_disp(const char *name, char *ip, int type, int arp_flags,
348 char *hwa, char *mask, char *dev) 348 char *hwa, char *mask, char *dev)
349{ 349{
350 static const int arp_masks[] = { 350 static const int arp_masks[] = {
351 ATF_PERM, ATF_PUBL, 351 ATF_PERM, ATF_PUBL,
@@ -428,7 +428,7 @@ static int arp_show(char *name)
428 /* All these strings can't overflow 428 /* All these strings can't overflow
429 * because fgets above reads limited amount of data */ 429 * because fgets above reads limited amount of data */
430 num = sscanf(line, "%s 0x%x 0x%x %s %s %s\n", 430 num = sscanf(line, "%s 0x%x 0x%x %s %s %s\n",
431 ip, &type, &flags, hwa, mask, dev); 431 ip, &type, &flags, hwa, mask, dev);
432 if (num < 4) 432 if (num < 4)
433 break; 433 break;
434 434
@@ -461,7 +461,7 @@ static int arp_show(char *name)
461 } 461 }
462 if (option_mask32 & ARP_OPT_v) 462 if (option_mask32 & ARP_OPT_v)
463 printf("Entries: %d\tSkipped: %d\tFound: %d\n", 463 printf("Entries: %d\tSkipped: %d\tFound: %d\n",
464 entries, entries - shown, shown); 464 entries, entries - shown, shown);
465 465
466 if (!shown) { 466 if (!shown) {
467 if (hw_set || host || device[0]) 467 if (hw_set || host || device[0])
@@ -517,7 +517,7 @@ int arp_main(int argc UNUSED_PARAM, char **argv)
517 517
518 if (hw->alen <= 0) { 518 if (hw->alen <= 0) {
519 bb_error_msg_and_die("%s: %s without ARP support", 519 bb_error_msg_and_die("%s: %s without ARP support",
520 hw->name, "hardware type"); 520 hw->name, "hardware type");
521 } 521 }
522 522
523 /* Now see what we have to do here... */ 523 /* Now see what we have to do here... */
diff --git a/networking/ether-wake.c b/networking/ether-wake.c
index 6a88279f4..a73b0baea 100644
--- a/networking/ether-wake.c
+++ b/networking/ether-wake.c
@@ -238,9 +238,9 @@ int ether_wake_main(int argc UNUSED_PARAM, char **argv)
238 { 238 {
239 unsigned char *hwaddr = if_hwaddr.ifr_hwaddr.sa_data; 239 unsigned char *hwaddr = if_hwaddr.ifr_hwaddr.sa_data;
240 printf("The hardware address (SIOCGIFHWADDR) of %s is type %d " 240 printf("The hardware address (SIOCGIFHWADDR) of %s is type %d "
241 "%2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x\n\n", ifname, 241 "%2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x\n\n", ifname,
242 if_hwaddr.ifr_hwaddr.sa_family, hwaddr[0], hwaddr[1], 242 if_hwaddr.ifr_hwaddr.sa_family, hwaddr[0], hwaddr[1],
243 hwaddr[2], hwaddr[3], hwaddr[4], hwaddr[5]); 243 hwaddr[2], hwaddr[3], hwaddr[4], hwaddr[5]);
244 } 244 }
245# endif 245# endif
246 } 246 }
diff --git a/networking/httpd.c b/networking/httpd.c
index a942794f5..1934bb27e 100644
--- a/networking/httpd.c
+++ b/networking/httpd.c
@@ -796,9 +796,9 @@ static void parse_conf(const char *path, int flag)
796 /* the line is not recognized */ 796 /* the line is not recognized */
797 config_error: 797 config_error:
798 bb_error_msg("config error '%s' in '%s'", buf, filename); 798 bb_error_msg("config error '%s' in '%s'", buf, filename);
799 } /* while (fgets) */ 799 } /* while (fgets) */
800 800
801 fclose(f); 801 fclose(f);
802} 802}
803 803
804#if ENABLE_FEATURE_HTTPD_ENCODE_URL_STR 804#if ENABLE_FEATURE_HTTPD_ENCODE_URL_STR
@@ -1708,7 +1708,7 @@ static int pam_talker(int num_msg,
1708 case PAM_PROMPT_ECHO_OFF: 1708 case PAM_PROMPT_ECHO_OFF:
1709 s = userinfo->pw; 1709 s = userinfo->pw;
1710 break; 1710 break;
1711 case PAM_ERROR_MSG: 1711 case PAM_ERROR_MSG:
1712 case PAM_TEXT_INFO: 1712 case PAM_TEXT_INFO:
1713 s = ""; 1713 s = "";
1714 break; 1714 break;
diff --git a/networking/httpd_ssi.c b/networking/httpd_ssi.c
index cfe64eb46..4bd9a6d97 100644
--- a/networking/httpd_ssi.c
+++ b/networking/httpd_ssi.c
@@ -133,7 +133,7 @@ static void process_includes(const char *filename)
133 process_includes(include_directive); 133 process_includes(include_directive);
134 134
135 /* Print everything after directive */ 135 /* Print everything after directive */
136 if (end) { 136 if (end) {
137 fputs(end, stdout); 137 fputs(end, stdout);
138 free(end); 138 free(end);
139 } 139 }
diff --git a/networking/ifconfig.c b/networking/ifconfig.c
index b6604f5d1..320df3010 100644
--- a/networking/ifconfig.c
+++ b/networking/ifconfig.c
@@ -449,7 +449,7 @@ int ifconfig_main(int argc UNUSED_PARAM, char **argv)
449 } 449 }
450#endif 450#endif
451 memcpy( (((char *)&ifr) + a1op->ifr_offset), 451 memcpy( (((char *)&ifr) + a1op->ifr_offset),
452 p, sizeof(struct sockaddr)); 452 p, sizeof(struct sockaddr));
453 } else { 453 } else {
454 /* FIXME: error check?? */ 454 /* FIXME: error check?? */
455 unsigned long i = strtoul(*argv, NULL, 0); 455 unsigned long i = strtoul(*argv, NULL, 0);
diff --git a/networking/interface.c b/networking/interface.c
index 79c322ec0..4b9b9485d 100644
--- a/networking/interface.c
+++ b/networking/interface.c
@@ -950,8 +950,8 @@ static void ife_print6(struct interface *ptr)
950 (struct sockaddr *) &sap.sin6_addr); 950 (struct sockaddr *) &sap.sin6_addr);
951 sap.sin6_family = AF_INET6; 951 sap.sin6_family = AF_INET6;
952 printf(" inet6 addr: %s/%d", 952 printf(" inet6 addr: %s/%d",
953 INET6_sprint((struct sockaddr *) &sap, 1), 953 INET6_sprint((struct sockaddr *) &sap, 1),
954 plen); 954 plen);
955 printf(" Scope:"); 955 printf(" Scope:");
956 switch (scope & IPV6_ADDR_SCOPE_MASK) { 956 switch (scope & IPV6_ADDR_SCOPE_MASK) {
957 case 0: 957 case 0:
@@ -1019,7 +1019,7 @@ static void ife_print(struct interface *ptr)
1019 1019
1020 if (ptr->has_ip) { 1020 if (ptr->has_ip) {
1021 printf(" %s addr:%s ", ap->name, 1021 printf(" %s addr:%s ", ap->name,
1022 ap->sprint(&ptr->addr, 1)); 1022 ap->sprint(&ptr->addr, 1));
1023 if (ptr->flags & IFF_POINTOPOINT) { 1023 if (ptr->flags & IFF_POINTOPOINT) {
1024 printf(" P-t-P:%s ", ap->sprint(&ptr->dstaddr, 1)); 1024 printf(" P-t-P:%s ", ap->sprint(&ptr->dstaddr, 1));
1025 } 1025 }
@@ -1102,17 +1102,17 @@ static void ife_print(struct interface *ptr)
1102 printf(" "); 1102 printf(" ");
1103 1103
1104 printf("RX packets:%llu errors:%lu dropped:%lu overruns:%lu frame:%lu\n", 1104 printf("RX packets:%llu errors:%lu dropped:%lu overruns:%lu frame:%lu\n",
1105 ptr->stats.rx_packets, ptr->stats.rx_errors, 1105 ptr->stats.rx_packets, ptr->stats.rx_errors,
1106 ptr->stats.rx_dropped, ptr->stats.rx_fifo_errors, 1106 ptr->stats.rx_dropped, ptr->stats.rx_fifo_errors,
1107 ptr->stats.rx_frame_errors); 1107 ptr->stats.rx_frame_errors);
1108 if (can_compress) 1108 if (can_compress)
1109 printf(" compressed:%lu\n", 1109 printf(" compressed:%lu\n",
1110 ptr->stats.rx_compressed); 1110 ptr->stats.rx_compressed);
1111 printf(" "); 1111 printf(" ");
1112 printf("TX packets:%llu errors:%lu dropped:%lu overruns:%lu carrier:%lu\n", 1112 printf("TX packets:%llu errors:%lu dropped:%lu overruns:%lu carrier:%lu\n",
1113 ptr->stats.tx_packets, ptr->stats.tx_errors, 1113 ptr->stats.tx_packets, ptr->stats.tx_errors,
1114 ptr->stats.tx_dropped, ptr->stats.tx_fifo_errors, 1114 ptr->stats.tx_dropped, ptr->stats.tx_fifo_errors,
1115 ptr->stats.tx_carrier_errors); 1115 ptr->stats.tx_carrier_errors);
1116 printf(" collisions:%lu ", ptr->stats.collisions); 1116 printf(" collisions:%lu ", ptr->stats.collisions);
1117 if (can_compress) 1117 if (can_compress)
1118 printf("compressed:%lu ", ptr->stats.tx_compressed); 1118 printf("compressed:%lu ", ptr->stats.tx_compressed);
@@ -1129,13 +1129,12 @@ static void ife_print(struct interface *ptr)
1129 printf(" "); 1129 printf(" ");
1130 if (ptr->map.irq) 1130 if (ptr->map.irq)
1131 printf("Interrupt:%d ", ptr->map.irq); 1131 printf("Interrupt:%d ", ptr->map.irq);
1132 if (ptr->map.base_addr >= 0x100) /* Only print devices using it for 1132 if (ptr->map.base_addr >= 0x100) /* Only print devices using it for I/O maps */
1133 I/O maps */
1134 printf("Base address:0x%lx ", 1133 printf("Base address:0x%lx ",
1135 (unsigned long) ptr->map.base_addr); 1134 (unsigned long) ptr->map.base_addr);
1136 if (ptr->map.mem_start) { 1135 if (ptr->map.mem_start) {
1137 printf("Memory:%lx-%lx ", ptr->map.mem_start, 1136 printf("Memory:%lx-%lx ", ptr->map.mem_start,
1138 ptr->map.mem_end); 1137 ptr->map.mem_end);
1139 } 1138 }
1140 if (ptr->map.dma) 1139 if (ptr->map.dma)
1141 printf("DMA chan:%x ", ptr->map.dma); 1140 printf("DMA chan:%x ", ptr->map.dma);
@@ -1168,7 +1167,7 @@ static struct interface *lookup_interface(char *name)
1168 1167
1169#ifdef UNUSED 1168#ifdef UNUSED
1170static int for_all_interfaces(int (*doit) (struct interface *, void *), 1169static int for_all_interfaces(int (*doit) (struct interface *, void *),
1171 void *cookie) 1170 void *cookie)
1172{ 1171{
1173 struct interface *ife; 1172 struct interface *ife;
1174 1173
diff --git a/networking/nc.c b/networking/nc.c
index 1b32e3aa3..0c843a686 100644
--- a/networking/nc.c
+++ b/networking/nc.c
@@ -120,7 +120,7 @@ int nc_main(int argc, char **argv)
120 /* getopt32 is _almost_ usable: 120 /* getopt32 is _almost_ usable:
121 ** it cannot handle "... -e PROG -prog-opt" */ 121 ** it cannot handle "... -e PROG -prog-opt" */
122 while ((opt = getopt(argc, argv, 122 while ((opt = getopt(argc, argv,
123 "" IF_NC_SERVER("lp:") IF_NC_EXTRA("w:i:f:e:") )) > 0 123 "" IF_NC_SERVER("lp:") IF_NC_EXTRA("w:i:f:e:") )) > 0
124 ) { 124 ) {
125 if (ENABLE_NC_SERVER && opt == 'l') 125 if (ENABLE_NC_SERVER && opt == 'l')
126 IF_NC_SERVER(do_listen++); 126 IF_NC_SERVER(do_listen++);
diff --git a/networking/ntpd.c b/networking/ntpd.c
index 7facf9484..45485c080 100644
--- a/networking/ntpd.c
+++ b/networking/ntpd.c
@@ -1854,7 +1854,7 @@ recv_and_process_client_pkt(void /*int fd*/)
1854 msg.m_status = G.stratum < MAXSTRAT ? G.ntp_status : LI_ALARM; 1854 msg.m_status = G.stratum < MAXSTRAT ? G.ntp_status : LI_ALARM;
1855 msg.m_status |= (query_status & VERSION_MASK); 1855 msg.m_status |= (query_status & VERSION_MASK);
1856 msg.m_status |= ((query_status & MODE_MASK) == MODE_CLIENT) ? 1856 msg.m_status |= ((query_status & MODE_MASK) == MODE_CLIENT) ?
1857 MODE_SERVER : MODE_SYM_PAS; 1857 MODE_SERVER : MODE_SYM_PAS;
1858 msg.m_stratum = G.stratum; 1858 msg.m_stratum = G.stratum;
1859 msg.m_ppoll = G.poll_exp; 1859 msg.m_ppoll = G.poll_exp;
1860 msg.m_precision_exp = G_precision_exp; 1860 msg.m_precision_exp = G_precision_exp;
@@ -2328,14 +2328,13 @@ set_freq(double freq) /* frequency update */
2328 if (pps_enable) { 2328 if (pps_enable) {
2329 if (!(pll_status & STA_PPSTIME)) 2329 if (!(pll_status & STA_PPSTIME))
2330 report_event(EVNT_KERN, 2330 report_event(EVNT_KERN,
2331 NULL, "PPS enabled"); 2331 NULL, "PPS enabled");
2332 ntv.status |= STA_PPSTIME | STA_PPSFREQ; 2332 ntv.status |= STA_PPSTIME | STA_PPSFREQ;
2333 } else { 2333 } else {
2334 if (pll_status & STA_PPSTIME) 2334 if (pll_status & STA_PPSTIME)
2335 report_event(EVNT_KERN, 2335 report_event(EVNT_KERN,
2336 NULL, "PPS disabled"); 2336 NULL, "PPS disabled");
2337 ntv.status &= ~(STA_PPSTIME | 2337 ntv.status &= ~(STA_PPSTIME | STA_PPSFREQ);
2338 STA_PPSFREQ);
2339 } 2338 }
2340 if (sys_leap == LEAP_ADDSECOND) 2339 if (sys_leap == LEAP_ADDSECOND)
2341 ntv.status |= STA_INS; 2340 ntv.status |= STA_INS;
@@ -2351,7 +2350,7 @@ set_freq(double freq) /* frequency update */
2351 if (ntp_adjtime(&ntv) == TIME_ERROR) { 2350 if (ntp_adjtime(&ntv) == TIME_ERROR) {
2352 if (!(ntv.status & STA_PPSSIGNAL)) 2351 if (!(ntv.status & STA_PPSSIGNAL))
2353 report_event(EVNT_KERN, NULL, 2352 report_event(EVNT_KERN, NULL,
2354 "PPS no signal"); 2353 "PPS no signal");
2355 } 2354 }
2356 pll_status = ntv.status; 2355 pll_status = ntv.status;
2357#ifdef STA_NANO 2356#ifdef STA_NANO
diff --git a/networking/ntpd_simple.c b/networking/ntpd_simple.c
index 1b7c66b84..55bded8ff 100644
--- a/networking/ntpd_simple.c
+++ b/networking/ntpd_simple.c
@@ -710,7 +710,7 @@ recv_and_process_client_pkt(void /*int fd*/)
710 msg.m_status = G.synced ? G.leap : LI_ALARM; 710 msg.m_status = G.synced ? G.leap : LI_ALARM;
711 msg.m_status |= (query_status & VERSION_MASK); 711 msg.m_status |= (query_status & VERSION_MASK);
712 msg.m_status |= ((query_status & MODE_MASK) == MODE_CLIENT) ? 712 msg.m_status |= ((query_status & MODE_MASK) == MODE_CLIENT) ?
713 MODE_SERVER : MODE_SYM_PAS; 713 MODE_SERVER : MODE_SYM_PAS;
714 msg.m_stratum = G.stratum; 714 msg.m_stratum = G.stratum;
715 msg.m_ppoll = query_ppoll; 715 msg.m_ppoll = query_ppoll;
716 msg.m_precision_exp = G_precision_exp; 716 msg.m_precision_exp = G_precision_exp;
diff --git a/networking/ping.c b/networking/ping.c
index b8a438ba8..3df67f5c3 100644
--- a/networking/ping.c
+++ b/networking/ping.c
@@ -724,7 +724,7 @@ static void ping6(len_and_sockaddr *lsa)
724 ICMP6_FILTER_SETPASSALL(&filt); 724 ICMP6_FILTER_SETPASSALL(&filt);
725 } 725 }
726 if (setsockopt(pingsock, IPPROTO_ICMPV6, ICMP6_FILTER, &filt, 726 if (setsockopt(pingsock, IPPROTO_ICMPV6, ICMP6_FILTER, &filt,
727 sizeof(filt)) < 0) 727 sizeof(filt)) < 0)
728 bb_error_msg_and_die("setsockopt(ICMP6_FILTER)"); 728 bb_error_msg_and_die("setsockopt(ICMP6_FILTER)");
729 } 729 }
730#endif /*ICMP6_FILTER*/ 730#endif /*ICMP6_FILTER*/
diff --git a/networking/route.c b/networking/route.c
index b7b5a02e6..45f2be542 100644
--- a/networking/route.c
+++ b/networking/route.c
@@ -409,7 +409,7 @@ static NOINLINE void INET6_setroute(int action, char **args)
409 bb_error_msg_and_die("resolving %s", args_m1); 409 bb_error_msg_and_die("resolving %s", args_m1);
410 } 410 }
411 memcpy(&rt.rtmsg_gateway, sa6.sin6_addr.s6_addr, 411 memcpy(&rt.rtmsg_gateway, sa6.sin6_addr.s6_addr,
412 sizeof(struct in6_addr)); 412 sizeof(struct in6_addr));
413 rt.rtmsg_flags |= RTF_GATEWAY; 413 rt.rtmsg_flags |= RTF_GATEWAY;
414 continue; 414 continue;
415 } 415 }
@@ -498,11 +498,11 @@ void FAST_FUNC bb_displayroutes(int noresolve, int netstatfmt)
498 FILE *fp = xfopen_for_read("/proc/net/route"); 498 FILE *fp = xfopen_for_read("/proc/net/route");
499 499
500 printf("Kernel IP routing table\n" 500 printf("Kernel IP routing table\n"
501 "Destination Gateway Genmask Flags %s Iface\n", 501 "Destination Gateway Genmask Flags %s Iface\n",
502 netstatfmt ? " MSS Window irtt" : "Metric Ref Use"); 502 netstatfmt ? " MSS Window irtt" : "Metric Ref Use");
503 503
504 if (fscanf(fp, "%*[^\n]\n") < 0) { /* Skip the first line. */ 504 if (fscanf(fp, "%*[^\n]\n") < 0) { /* Skip the first line. */
505 goto ERROR; /* Empty or missing line, or read error. */ 505 goto ERROR; /* Empty or missing line, or read error. */
506 } 506 }
507 while (1) { 507 while (1) {
508 int r; 508 int r;
@@ -567,8 +567,8 @@ static void INET6_displayroutes(void)
567 FILE *fp = xfopen_for_read("/proc/net/ipv6_route"); 567 FILE *fp = xfopen_for_read("/proc/net/ipv6_route");
568 568
569 printf("Kernel IPv6 routing table\n%-44s%-40s" 569 printf("Kernel IPv6 routing table\n%-44s%-40s"
570 "Flags Metric Ref Use Iface\n", 570 "Flags Metric Ref Use Iface\n",
571 "Destination", "Next Hop"); 571 "Destination", "Next Hop");
572 572
573 while (1) { 573 while (1) {
574 int r; 574 int r;
@@ -618,8 +618,8 @@ static void INET6_displayroutes(void)
618 (struct sockaddr *) &snaddr6.sin6_addr); 618 (struct sockaddr *) &snaddr6.sin6_addr);
619 snaddr6.sin6_family = AF_INET6; 619 snaddr6.sin6_family = AF_INET6;
620 naddr6 = INET6_rresolve((struct sockaddr_in6 *) &snaddr6, 620 naddr6 = INET6_rresolve((struct sockaddr_in6 *) &snaddr6,
621 0x0fff /* Apparently, upstream never resolves. */ 621 0x0fff /* Apparently, upstream never resolves. */
622 ); 622 );
623 623
624 if (!r) { /* 1st pass */ 624 if (!r) { /* 1st pass */
625 snprintf(addr6, sizeof(addr6), "%s/%d", naddr6, prefix_len); 625 snprintf(addr6, sizeof(addr6), "%s/%d", naddr6, prefix_len);
diff --git a/procps/powertop.c b/procps/powertop.c
index a69ee12b0..71988a295 100644
--- a/procps/powertop.c
+++ b/procps/powertop.c
@@ -493,7 +493,7 @@ static NOINLINE int process_timer_stats(void)
493 * Get information about CPU using CPUID opcode. 493 * Get information about CPU using CPUID opcode.
494 */ 494 */
495static void cpuid(unsigned int *eax, unsigned int *ebx, unsigned int *ecx, 495static void cpuid(unsigned int *eax, unsigned int *ebx, unsigned int *ecx,
496 unsigned int *edx) 496 unsigned int *edx)
497{ 497{
498 /* EAX value specifies what information to return */ 498 /* EAX value specifies what information to return */
499 __asm__( 499 __asm__(
diff --git a/procps/sysctl.c b/procps/sysctl.c
index 878656862..c6a1de21d 100644
--- a/procps/sysctl.c
+++ b/procps/sysctl.c
@@ -205,7 +205,7 @@ static int sysctl_act_recursive(const char *path)
205 continue; /* d_name is "." or ".." */ 205 continue; /* d_name is "." or ".." */
206 /* if path was ".", drop "./" prefix: */ 206 /* if path was ".", drop "./" prefix: */
207 retval |= sysctl_act_recursive((next[0] == '.' && next[1] == '/') ? 207 retval |= sysctl_act_recursive((next[0] == '.' && next[1] == '/') ?
208 next + 2 : next); 208 next + 2 : next);
209 free(next); 209 free(next);
210 } 210 }
211 closedir(dirp); 211 closedir(dirp);
diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c
index ad54e22dd..2053cb146 100644
--- a/sysklogd/syslogd.c
+++ b/sysklogd/syslogd.c
@@ -253,7 +253,7 @@ enum {
253#define OPTION_PARAM &opt_m, &(G.logFile.path), &opt_l \ 253#define OPTION_PARAM &opt_m, &(G.logFile.path), &opt_l \
254 IF_FEATURE_ROTATE_LOGFILE(,&opt_s) \ 254 IF_FEATURE_ROTATE_LOGFILE(,&opt_s) \
255 IF_FEATURE_ROTATE_LOGFILE(,&opt_b) \ 255 IF_FEATURE_ROTATE_LOGFILE(,&opt_b) \
256 IF_FEATURE_REMOTE_LOG( ,&remoteAddrList) \ 256 IF_FEATURE_REMOTE_LOG( ,&remoteAddrList) \
257 IF_FEATURE_IPC_SYSLOG( ,&opt_C) \ 257 IF_FEATURE_IPC_SYSLOG( ,&opt_C) \
258 IF_FEATURE_SYSLOGD_CFG( ,&opt_f) 258 IF_FEATURE_SYSLOGD_CFG( ,&opt_f)
259 259
diff --git a/util-linux/fdformat.c b/util-linux/fdformat.c
index 2f0854a30..b3e918fb0 100644
--- a/util-linux/fdformat.c
+++ b/util-linux/fdformat.c
@@ -116,7 +116,7 @@ int fdformat_main(int argc UNUSED_PARAM, char **argv)
116 /* Check backwards so we don't need a counter */ 116 /* Check backwards so we don't need a counter */
117 while (--read_bytes >= 0) { 117 while (--read_bytes >= 0) {
118 if (data[read_bytes] != FD_FILL_BYTE) { 118 if (data[read_bytes] != FD_FILL_BYTE) {
119 printf("bad data in cyl %d\nContinuing... ", cyl); 119 printf("bad data in cyl %d\nContinuing... ", cyl);
120 } 120 }
121 } 121 }
122 } 122 }
diff --git a/util-linux/fdisk.c b/util-linux/fdisk.c
index c0be15a3a..39eb27b47 100644
--- a/util-linux/fdisk.c
+++ b/util-linux/fdisk.c
@@ -3023,7 +3023,7 @@ int fdisk_main(int argc UNUSED_PARAM, char **argv)
3023 printf("\nThe current boot file is: %s\n", 3023 printf("\nThe current boot file is: %s\n",
3024 sgi_get_bootfile()); 3024 sgi_get_bootfile());
3025 if (read_maybe_empty("Please enter the name of the " 3025 if (read_maybe_empty("Please enter the name of the "
3026 "new boot file: ") == '\n') 3026 "new boot file: ") == '\n')
3027 printf("Boot file unchanged\n"); 3027 printf("Boot file unchanged\n");
3028 else 3028 else
3029 sgi_set_bootfile(line_ptr); 3029 sgi_set_bootfile(line_ptr);
diff --git a/util-linux/flock.c b/util-linux/flock.c
index e9be4eee9..05a747f72 100644
--- a/util-linux/flock.c
+++ b/util-linux/flock.c
@@ -45,7 +45,7 @@ int flock_main(int argc UNUSED_PARAM, char **argv)
45 if (argv[1]) { 45 if (argv[1]) {
46 fd = open(argv[0], O_RDONLY|O_NOCTTY|O_CREAT, 0666); 46 fd = open(argv[0], O_RDONLY|O_NOCTTY|O_CREAT, 0666);
47 if (fd < 0 && errno == EISDIR) 47 if (fd < 0 && errno == EISDIR)
48 fd = open(argv[0], O_RDONLY|O_NOCTTY); 48 fd = open(argv[0], O_RDONLY|O_NOCTTY);
49 if (fd < 0) 49 if (fd < 0)
50 bb_perror_msg_and_die("can't open '%s'", argv[0]); 50 bb_perror_msg_and_die("can't open '%s'", argv[0]);
51 //TODO? close_on_exec_on(fd); 51 //TODO? close_on_exec_on(fd);
diff --git a/util-linux/ipcrm.c b/util-linux/ipcrm.c
index 274050cdf..888f70ef8 100644
--- a/util-linux/ipcrm.c
+++ b/util-linux/ipcrm.c
@@ -160,7 +160,7 @@ int ipcrm_main(int argc, char **argv)
160 160
161 /* convert key to id */ 161 /* convert key to id */
162 id = ((c == 'q') ? msgget(key, 0) : 162 id = ((c == 'q') ? msgget(key, 0) :
163 (c == 'm') ? shmget(key, 0, 0) : semget(key, 0, 0)); 163 (c == 'm') ? shmget(key, 0, 0) : semget(key, 0, 0));
164 164
165 if (id < 0) { 165 if (id < 0) {
166 const char *errmsg; 166 const char *errmsg;
@@ -189,8 +189,8 @@ int ipcrm_main(int argc, char **argv)
189 } 189 }
190 190
191 result = ((c == 'q') ? msgctl(id, IPC_RMID, NULL) : 191 result = ((c == 'q') ? msgctl(id, IPC_RMID, NULL) :
192 (c == 'm') ? shmctl(id, IPC_RMID, NULL) : 192 (c == 'm') ? shmctl(id, IPC_RMID, NULL) :
193 semctl(id, 0, IPC_RMID, arg)); 193 semctl(id, 0, IPC_RMID, arg));
194 194
195 if (result) { 195 if (result) {
196 const char *errmsg; 196 const char *errmsg;
diff --git a/util-linux/ipcs.c b/util-linux/ipcs.c
index ee7df5e33..8fdaf0b85 100644
--- a/util-linux/ipcs.c
+++ b/util-linux/ipcs.c
@@ -154,52 +154,52 @@ static NOINLINE void do_shm(void)
154 /* glibc 2.1.3 and all earlier libc's have ints as fields 154 /* glibc 2.1.3 and all earlier libc's have ints as fields
155 of struct shminfo; glibc 2.1.91 has unsigned long; ach */ 155 of struct shminfo; glibc 2.1.91 has unsigned long; ach */
156 printf("max number of segments = %lu\n" 156 printf("max number of segments = %lu\n"
157 "max seg size (kbytes) = %lu\n" 157 "max seg size (kbytes) = %lu\n"
158 "max total shared memory (pages) = %lu\n" 158 "max total shared memory (pages) = %lu\n"
159 "min seg size (bytes) = %lu\n", 159 "min seg size (bytes) = %lu\n",
160 (unsigned long) shminfo.shmmni, 160 (unsigned long) shminfo.shmmni,
161 (unsigned long) (shminfo.shmmax >> 10), 161 (unsigned long) (shminfo.shmmax >> 10),
162 (unsigned long) shminfo.shmall, 162 (unsigned long) shminfo.shmall,
163 (unsigned long) shminfo.shmmin); 163 (unsigned long) shminfo.shmmin);
164 return; 164 return;
165 165
166 case STATUS: 166 case STATUS:
167 printf("------ Shared Memory %s --------\n", "Status"); 167 printf("------ Shared Memory %s --------\n", "Status");
168 printf( "segments allocated %d\n" 168 printf("segments allocated %d\n"
169 "pages allocated %ld\n" 169 "pages allocated %ld\n"
170 "pages resident %ld\n" 170 "pages resident %ld\n"
171 "pages swapped %ld\n" 171 "pages swapped %ld\n"
172 "Swap performance: %ld attempts\t%ld successes\n", 172 "Swap performance: %ld attempts\t%ld successes\n",
173 shm_info.used_ids, 173 shm_info.used_ids,
174 shm_info.shm_tot, 174 shm_info.shm_tot,
175 shm_info.shm_rss, 175 shm_info.shm_rss,
176 shm_info.shm_swp, 176 shm_info.shm_swp,
177 shm_info.swap_attempts, shm_info.swap_successes); 177 shm_info.swap_attempts, shm_info.swap_successes);
178 return; 178 return;
179 179
180 case CREATOR: 180 case CREATOR:
181 printf("------ Shared Memory %s --------\n", "Segment Creators/Owners"); 181 printf("------ Shared Memory %s --------\n", "Segment Creators/Owners");
182 printf( "%-10s %-10s %-10s %-10s %-10s %-10s\n", 182 printf("%-10s %-10s %-10s %-10s %-10s %-10s\n",
183 "shmid", "perms", "cuid", "cgid", "uid", "gid"); 183 "shmid", "perms", "cuid", "cgid", "uid", "gid");
184 break; 184 break;
185 185
186 case TIME: 186 case TIME:
187 printf("------ Shared Memory %s --------\n", "Attach/Detach/Change Times"); 187 printf("------ Shared Memory %s --------\n", "Attach/Detach/Change Times");
188 printf( "%-10s %-10s %-20s %-20s %-20s\n", 188 printf("%-10s %-10s %-20s %-20s %-20s\n",
189 "shmid", "owner", "attached", "detached", "changed"); 189 "shmid", "owner", "attached", "detached", "changed");
190 break; 190 break;
191 191
192 case PID: 192 case PID:
193 printf("------ Shared Memory %s --------\n", "Creator/Last-op"); 193 printf("------ Shared Memory %s --------\n", "Creator/Last-op");
194 printf( "%-10s %-10s %-10s %-10s\n", 194 printf("%-10s %-10s %-10s %-10s\n",
195 "shmid", "owner", "cpid", "lpid"); 195 "shmid", "owner", "cpid", "lpid");
196 break; 196 break;
197 197
198 default: 198 default:
199 printf("------ Shared Memory %s --------\n", "Segments"); 199 printf("------ Shared Memory %s --------\n", "Segments");
200 printf( "%-10s %-10s %-10s %-10s %-10s %-10s %-12s\n", 200 printf("%-10s %-10s %-10s %-10s %-10s %-10s %-12s\n",
201 "key", "shmid", "owner", "perms", "bytes", "nattch", 201 "key", "shmid", "owner", "perms", "bytes", "nattch",
202 "status"); 202 "status");
203 break; 203 break;
204 } 204 }
205 205
@@ -220,11 +220,11 @@ static NOINLINE void do_shm(void)
220 printf("%-10d %-10d", shmid, ipcp->uid); 220 printf("%-10d %-10d", shmid, ipcp->uid);
221 /* ctime uses static buffer: use separate calls */ 221 /* ctime uses static buffer: use separate calls */
222 printf(" %-20.16s", shmseg.shm_atime 222 printf(" %-20.16s", shmseg.shm_atime
223 ? ctime(&shmseg.shm_atime) + 4 : "Not set"); 223 ? ctime(&shmseg.shm_atime) + 4 : "Not set");
224 printf(" %-20.16s", shmseg.shm_dtime 224 printf(" %-20.16s", shmseg.shm_dtime
225 ? ctime(&shmseg.shm_dtime) + 4 : "Not set"); 225 ? ctime(&shmseg.shm_dtime) + 4 : "Not set");
226 printf(" %-20.16s\n", shmseg.shm_ctime 226 printf(" %-20.16s\n", shmseg.shm_ctime
227 ? ctime(&shmseg.shm_ctime) + 4 : "Not set"); 227 ? ctime(&shmseg.shm_ctime) + 4 : "Not set");
228 break; 228 break;
229 case PID: 229 case PID:
230 if (pw) 230 if (pw)
@@ -241,17 +241,17 @@ static NOINLINE void do_shm(void)
241 else 241 else
242 printf("%-10d %-10d", shmid, ipcp->uid); 242 printf("%-10d %-10d", shmid, ipcp->uid);
243 printf(" %-10o %-10lu %-10ld %-6s %-6s\n", ipcp->mode & 0777, 243 printf(" %-10o %-10lu %-10ld %-6s %-6s\n", ipcp->mode & 0777,
244 /* 244 /*
245 * earlier: int, Austin has size_t 245 * earlier: int, Austin has size_t
246 */ 246 */
247 (unsigned long) shmseg.shm_segsz, 247 (unsigned long) shmseg.shm_segsz,
248 /* 248 /*
249 * glibc-2.1.3 and earlier has unsigned short; 249 * glibc-2.1.3 and earlier has unsigned short;
250 * Austin has shmatt_t 250 * Austin has shmatt_t
251 */ 251 */
252 (long) shmseg.shm_nattch, 252 (long) shmseg.shm_nattch,
253 ipcp->mode & SHM_DEST ? "dest" : " ", 253 ipcp->mode & SHM_DEST ? "dest" : " ",
254 ipcp->mode & SHM_LOCKED ? "locked" : " "); 254 ipcp->mode & SHM_LOCKED ? "locked" : " ");
255 break; 255 break;
256 } 256 }
257 } 257 }
@@ -281,32 +281,32 @@ static NOINLINE void do_sem(void)
281 if ((semctl(0, 0, IPC_INFO, arg)) < 0) 281 if ((semctl(0, 0, IPC_INFO, arg)) < 0)
282 return; 282 return;
283 printf("max number of arrays = %d\n" 283 printf("max number of arrays = %d\n"
284 "max semaphores per array = %d\n" 284 "max semaphores per array = %d\n"
285 "max semaphores system wide = %d\n" 285 "max semaphores system wide = %d\n"
286 "max ops per semop call = %d\n" 286 "max ops per semop call = %d\n"
287 "semaphore max value = %d\n", 287 "semaphore max value = %d\n",
288 seminfo.semmni, 288 seminfo.semmni,
289 seminfo.semmsl, 289 seminfo.semmsl,
290 seminfo.semmns, seminfo.semopm, seminfo.semvmx); 290 seminfo.semmns, seminfo.semopm, seminfo.semvmx);
291 return; 291 return;
292 292
293 case STATUS: 293 case STATUS:
294 printf("------ Semaphore %s --------\n", "Status"); 294 printf("------ Semaphore %s --------\n", "Status");
295 printf( "used arrays = %d\n" 295 printf("used arrays = %d\n"
296 "allocated semaphores = %d\n", 296 "allocated semaphores = %d\n",
297 seminfo.semusz, seminfo.semaem); 297 seminfo.semusz, seminfo.semaem);
298 return; 298 return;
299 299
300 case CREATOR: 300 case CREATOR:
301 printf("------ Semaphore %s --------\n", "Arrays Creators/Owners"); 301 printf("------ Semaphore %s --------\n", "Arrays Creators/Owners");
302 printf( "%-10s %-10s %-10s %-10s %-10s %-10s\n", 302 printf("%-10s %-10s %-10s %-10s %-10s %-10s\n",
303 "semid", "perms", "cuid", "cgid", "uid", "gid"); 303 "semid", "perms", "cuid", "cgid", "uid", "gid");
304 break; 304 break;
305 305
306 case TIME: 306 case TIME:
307 printf("------ Shared Memory %s --------\n", "Operation/Change Times"); 307 printf("------ Shared Memory %s --------\n", "Operation/Change Times");
308 printf( "%-8s %-10s %-26.24s %-26.24s\n", 308 printf("%-8s %-10s %-26.24s %-26.24s\n",
309 "shmid", "owner", "last-op", "last-changed"); 309 "shmid", "owner", "last-op", "last-changed");
310 break; 310 break;
311 311
312 case PID: 312 case PID:
@@ -314,8 +314,8 @@ static NOINLINE void do_sem(void)
314 314
315 default: 315 default:
316 printf("------ Semaphore %s --------\n", "Arrays"); 316 printf("------ Semaphore %s --------\n", "Arrays");
317 printf( "%-10s %-10s %-10s %-10s %-10s\n", 317 printf("%-10s %-10s %-10s %-10s %-10s\n",
318 "key", "semid", "owner", "perms", "nsems"); 318 "key", "semid", "owner", "perms", "nsems");
319 break; 319 break;
320 } 320 }
321 321
@@ -337,9 +337,9 @@ static NOINLINE void do_sem(void)
337 printf("%-8d %-10d", semid, ipcp->uid); 337 printf("%-8d %-10d", semid, ipcp->uid);
338 /* ctime uses static buffer: use separate calls */ 338 /* ctime uses static buffer: use separate calls */
339 printf(" %-26.24s", semary.sem_otime 339 printf(" %-26.24s", semary.sem_otime
340 ? ctime(&semary.sem_otime) : "Not set"); 340 ? ctime(&semary.sem_otime) : "Not set");
341 printf(" %-26.24s\n", semary.sem_ctime 341 printf(" %-26.24s\n", semary.sem_ctime
342 ? ctime(&semary.sem_ctime) : "Not set"); 342 ? ctime(&semary.sem_ctime) : "Not set");
343 break; 343 break;
344 case PID: 344 case PID:
345 break; 345 break;
@@ -351,13 +351,13 @@ static NOINLINE void do_sem(void)
351 else 351 else
352 printf("%-10d %-9d", semid, ipcp->uid); 352 printf("%-10d %-9d", semid, ipcp->uid);
353 printf(" %-10o %-10ld\n", ipcp->mode & 0777, 353 printf(" %-10o %-10ld\n", ipcp->mode & 0777,
354 /* 354 /*
355 * glibc-2.1.3 and earlier has unsigned short; 355 * glibc-2.1.3 and earlier has unsigned short;
356 * glibc-2.1.91 has variation between 356 * glibc-2.1.91 has variation between
357 * unsigned short and unsigned long 357 * unsigned short and unsigned long
358 * Austin prescribes unsigned short. 358 * Austin prescribes unsigned short.
359 */ 359 */
360 (long) semary.sem_nsems); 360 (long) semary.sem_nsems);
361 break; 361 break;
362 } 362 }
363 } 363 }
@@ -383,42 +383,42 @@ static NOINLINE void do_msg(void)
383 if ((msgctl(0, IPC_INFO, (struct msqid_ds *) (void *) &msginfo)) < 0) 383 if ((msgctl(0, IPC_INFO, (struct msqid_ds *) (void *) &msginfo)) < 0)
384 return; 384 return;
385 printf("------ Message%s --------\n", "s: Limits"); 385 printf("------ Message%s --------\n", "s: Limits");
386 printf( "max queues system wide = %d\n" 386 printf("max queues system wide = %d\n"
387 "max size of message (bytes) = %d\n" 387 "max size of message (bytes) = %d\n"
388 "default max size of queue (bytes) = %d\n", 388 "default max size of queue (bytes) = %d\n",
389 msginfo.msgmni, msginfo.msgmax, msginfo.msgmnb); 389 msginfo.msgmni, msginfo.msgmax, msginfo.msgmnb);
390 return; 390 return;
391 391
392 case STATUS: 392 case STATUS:
393 printf("------ Message%s --------\n", "s: Status"); 393 printf("------ Message%s --------\n", "s: Status");
394 printf( "allocated queues = %d\n" 394 printf("allocated queues = %d\n"
395 "used headers = %d\n" 395 "used headers = %d\n"
396 "used space = %d bytes\n", 396 "used space = %d bytes\n",
397 msginfo.msgpool, msginfo.msgmap, msginfo.msgtql); 397 msginfo.msgpool, msginfo.msgmap, msginfo.msgtql);
398 return; 398 return;
399 399
400 case CREATOR: 400 case CREATOR:
401 printf("------ Message%s --------\n", " Queues: Creators/Owners"); 401 printf("------ Message%s --------\n", " Queues: Creators/Owners");
402 printf( "%-10s %-10s %-10s %-10s %-10s %-10s\n", 402 printf("%-10s %-10s %-10s %-10s %-10s %-10s\n",
403 "msqid", "perms", "cuid", "cgid", "uid", "gid"); 403 "msqid", "perms", "cuid", "cgid", "uid", "gid");
404 break; 404 break;
405 405
406 case TIME: 406 case TIME:
407 printf("------ Message%s --------\n", " Queues Send/Recv/Change Times"); 407 printf("------ Message%s --------\n", " Queues Send/Recv/Change Times");
408 printf( "%-8s %-10s %-20s %-20s %-20s\n", 408 printf("%-8s %-10s %-20s %-20s %-20s\n",
409 "msqid", "owner", "send", "recv", "change"); 409 "msqid", "owner", "send", "recv", "change");
410 break; 410 break;
411 411
412 case PID: 412 case PID:
413 printf("------ Message%s --------\n", " Queues PIDs"); 413 printf("------ Message%s --------\n", " Queues PIDs");
414 printf( "%-10s %-10s %-10s %-10s\n", 414 printf("%-10s %-10s %-10s %-10s\n",
415 "msqid", "owner", "lspid", "lrpid"); 415 "msqid", "owner", "lspid", "lrpid");
416 break; 416 break;
417 417
418 default: 418 default:
419 printf("------ Message%s --------\n", " Queues"); 419 printf("------ Message%s --------\n", " Queues");
420 printf( "%-10s %-10s %-10s %-10s %-12s %-12s\n", 420 printf("%-10s %-10s %-10s %-10s %-12s %-12s\n",
421 "key", "msqid", "owner", "perms", "used-bytes", "messages"); 421 "key", "msqid", "owner", "perms", "used-bytes", "messages");
422 break; 422 break;
423 } 423 }
424 424
@@ -438,11 +438,11 @@ static NOINLINE void do_msg(void)
438 else 438 else
439 printf("%-8d %-10d", msqid, ipcp->uid); 439 printf("%-8d %-10d", msqid, ipcp->uid);
440 printf(" %-20.16s", msgque.msg_stime 440 printf(" %-20.16s", msgque.msg_stime
441 ? ctime(&msgque.msg_stime) + 4 : "Not set"); 441 ? ctime(&msgque.msg_stime) + 4 : "Not set");
442 printf(" %-20.16s", msgque.msg_rtime 442 printf(" %-20.16s", msgque.msg_rtime
443 ? ctime(&msgque.msg_rtime) + 4 : "Not set"); 443 ? ctime(&msgque.msg_rtime) + 4 : "Not set");
444 printf(" %-20.16s\n", msgque.msg_ctime 444 printf(" %-20.16s\n", msgque.msg_ctime
445 ? ctime(&msgque.msg_ctime) + 4 : "Not set"); 445 ? ctime(&msgque.msg_ctime) + 4 : "Not set");
446 break; 446 break;
447 case PID: 447 case PID:
448 if (pw) 448 if (pw)
@@ -459,13 +459,13 @@ static NOINLINE void do_msg(void)
459 else 459 else
460 printf("%-10d %-10d", msqid, ipcp->uid); 460 printf("%-10d %-10d", msqid, ipcp->uid);
461 printf(" %-10o %-12ld %-12ld\n", ipcp->mode & 0777, 461 printf(" %-10o %-12ld %-12ld\n", ipcp->mode & 0777,
462 /* 462 /*
463 * glibc-2.1.3 and earlier has unsigned short; 463 * glibc-2.1.3 and earlier has unsigned short;
464 * glibc-2.1.91 has variation between 464 * glibc-2.1.91 has variation between
465 * unsigned short, unsigned long 465 * unsigned short, unsigned long
466 * Austin has msgqnum_t 466 * Austin has msgqnum_t
467 */ 467 */
468 (long) msgque.msg_cbytes, (long) msgque.msg_qnum); 468 (long) msgque.msg_cbytes, (long) msgque.msg_qnum);
469 break; 469 break;
470 } 470 }
471 } 471 }
@@ -483,18 +483,18 @@ static void print_shm(int shmid)
483 } 483 }
484 484
485 printf("\nShared memory Segment shmid=%d\n" 485 printf("\nShared memory Segment shmid=%d\n"
486 "uid=%d\tgid=%d\tcuid=%d\tcgid=%d\n" 486 "uid=%d\tgid=%d\tcuid=%d\tcgid=%d\n"
487 "mode=%#o\taccess_perms=%#o\n" 487 "mode=%#o\taccess_perms=%#o\n"
488 "bytes=%ld\tlpid=%d\tcpid=%d\tnattch=%ld\n", 488 "bytes=%ld\tlpid=%d\tcpid=%d\tnattch=%ld\n",
489 shmid, 489 shmid,
490 ipcp->uid, ipcp->gid, ipcp->cuid, ipcp->cgid, 490 ipcp->uid, ipcp->gid, ipcp->cuid, ipcp->cgid,
491 ipcp->mode, ipcp->mode & 0777, 491 ipcp->mode, ipcp->mode & 0777,
492 (long) shmds.shm_segsz, shmds.shm_lpid, shmds.shm_cpid, 492 (long) shmds.shm_segsz, shmds.shm_lpid, shmds.shm_cpid,
493 (long) shmds.shm_nattch); 493 (long) shmds.shm_nattch);
494 printf("att_time=%-26.24s\n", 494 printf("att_time=%-26.24s\n",
495 shmds.shm_atime ? ctime(&shmds.shm_atime) : "Not set"); 495 shmds.shm_atime ? ctime(&shmds.shm_atime) : "Not set");
496 printf("det_time=%-26.24s\n", 496 printf("det_time=%-26.24s\n",
497 shmds.shm_dtime ? ctime(&shmds.shm_dtime) : "Not set"); 497 shmds.shm_dtime ? ctime(&shmds.shm_dtime) : "Not set");
498 printf("change_time=%-26.24s\n\n", ctime(&shmds.shm_ctime)); 498 printf("change_time=%-26.24s\n\n", ctime(&shmds.shm_ctime));
499} 499}
500 500
@@ -510,24 +510,24 @@ static void print_msg(int msqid)
510 } 510 }
511 511
512 printf("\nMessage Queue msqid=%d\n" 512 printf("\nMessage Queue msqid=%d\n"
513 "uid=%d\tgid=%d\tcuid=%d\tcgid=%d\tmode=%#o\n" 513 "uid=%d\tgid=%d\tcuid=%d\tcgid=%d\tmode=%#o\n"
514 "cbytes=%ld\tqbytes=%ld\tqnum=%ld\tlspid=%d\tlrpid=%d\n", 514 "cbytes=%ld\tqbytes=%ld\tqnum=%ld\tlspid=%d\tlrpid=%d\n",
515 msqid, ipcp->uid, ipcp->gid, ipcp->cuid, ipcp->cgid, ipcp->mode, 515 msqid, ipcp->uid, ipcp->gid, ipcp->cuid, ipcp->cgid, ipcp->mode,
516 /* 516 /*
517 * glibc-2.1.3 and earlier has unsigned short; 517 * glibc-2.1.3 and earlier has unsigned short;
518 * glibc-2.1.91 has variation between 518 * glibc-2.1.91 has variation between
519 * unsigned short, unsigned long 519 * unsigned short, unsigned long
520 * Austin has msgqnum_t (for msg_qbytes) 520 * Austin has msgqnum_t (for msg_qbytes)
521 */ 521 */
522 (long) buf.msg_cbytes, (long) buf.msg_qbytes, 522 (long) buf.msg_cbytes, (long) buf.msg_qbytes,
523 (long) buf.msg_qnum, buf.msg_lspid, buf.msg_lrpid); 523 (long) buf.msg_qnum, buf.msg_lspid, buf.msg_lrpid);
524 524
525 printf("send_time=%-26.24s\n", 525 printf("send_time=%-26.24s\n",
526 buf.msg_stime ? ctime(&buf.msg_stime) : "Not set"); 526 buf.msg_stime ? ctime(&buf.msg_stime) : "Not set");
527 printf("rcv_time=%-26.24s\n", 527 printf("rcv_time=%-26.24s\n",
528 buf.msg_rtime ? ctime(&buf.msg_rtime) : "Not set"); 528 buf.msg_rtime ? ctime(&buf.msg_rtime) : "Not set");
529 printf("change_time=%-26.24s\n\n", 529 printf("change_time=%-26.24s\n\n",
530 buf.msg_ctime ? ctime(&buf.msg_ctime) : "Not set"); 530 buf.msg_ctime ? ctime(&buf.msg_ctime) : "Not set");
531} 531}
532 532
533static void print_sem(int semid) 533static void print_sem(int semid)
@@ -544,19 +544,19 @@ static void print_sem(int semid)
544 } 544 }
545 545
546 printf("\nSemaphore Array semid=%d\n" 546 printf("\nSemaphore Array semid=%d\n"
547 "uid=%d\t gid=%d\t cuid=%d\t cgid=%d\n" 547 "uid=%d\t gid=%d\t cuid=%d\t cgid=%d\n"
548 "mode=%#o, access_perms=%#o\n" 548 "mode=%#o, access_perms=%#o\n"
549 "nsems = %ld\n" 549 "nsems = %ld\n"
550 "otime = %-26.24s\n", 550 "otime = %-26.24s\n",
551 semid, 551 semid,
552 ipcp->uid, ipcp->gid, ipcp->cuid, ipcp->cgid, 552 ipcp->uid, ipcp->gid, ipcp->cuid, ipcp->cgid,
553 ipcp->mode, ipcp->mode & 0777, 553 ipcp->mode, ipcp->mode & 0777,
554 (long) semds.sem_nsems, 554 (long) semds.sem_nsems,
555 semds.sem_otime ? ctime(&semds.sem_otime) : "Not set"); 555 semds.sem_otime ? ctime(&semds.sem_otime) : "Not set");
556 printf("ctime = %-26.24s\n" 556 printf("ctime = %-26.24s\n"
557 "%-10s %-10s %-10s %-10s %-10s\n", 557 "%-10s %-10s %-10s %-10s %-10s\n",
558 ctime(&semds.sem_ctime), 558 ctime(&semds.sem_ctime),
559 "semnum", "value", "ncount", "zcount", "pid"); 559 "semnum", "value", "ncount", "zcount", "pid");
560 560
561 arg.val = 0; 561 arg.val = 0;
562 for (i = 0; i < semds.sem_nsems; i++) { 562 for (i = 0; i < semds.sem_nsems; i++) {
diff --git a/util-linux/lspci.c b/util-linux/lspci.c
index 5184858d1..514678afd 100644
--- a/util-linux/lspci.c
+++ b/util-linux/lspci.c
@@ -74,11 +74,11 @@ static int FAST_FUNC fileAction(
74 74
75 if (option_mask32 & OPT_m) { 75 if (option_mask32 & OPT_m) {
76 printf("%s \"Class %04x\" \"%04x\" \"%04x\" \"%04x\" \"%04x\"", 76 printf("%s \"Class %04x\" \"%04x\" \"%04x\" \"%04x\" \"%04x\"",
77 pci_slot_name, pci_class, pci_vid, pci_did, 77 pci_slot_name, pci_class, pci_vid, pci_did,
78 pci_subsys_vid, pci_subsys_did); 78 pci_subsys_vid, pci_subsys_did);
79 } else { 79 } else {
80 printf("%s Class %04x: %04x:%04x", 80 printf("%s Class %04x: %04x:%04x",
81 pci_slot_name, pci_class, pci_vid, pci_did); 81 pci_slot_name, pci_class, pci_vid, pci_did);
82 } 82 }
83 83
84 if ((option_mask32 & OPT_k) && driver) { 84 if ((option_mask32 & OPT_k) && driver) {
diff --git a/util-linux/mount.c b/util-linux/mount.c
index 525fdcce9..bcb298c07 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -927,7 +927,7 @@ static bool_t xdr_fhandle(XDR *xdrs, fhandle objp)
927static bool_t xdr_fhstatus(XDR *xdrs, fhstatus *objp) 927static bool_t xdr_fhstatus(XDR *xdrs, fhstatus *objp)
928{ 928{
929 if (!xdr_u_int(xdrs, &objp->fhs_status)) 929 if (!xdr_u_int(xdrs, &objp->fhs_status))
930 return FALSE; 930 return FALSE;
931 if (objp->fhs_status == 0) 931 if (objp->fhs_status == 0)
932 return xdr_fhandle(xdrs, objp->fhstatus_u.fhs_fhandle); 932 return xdr_fhandle(xdrs, objp->fhstatus_u.fhs_fhandle);
933 return TRUE; 933 return TRUE;
@@ -941,8 +941,8 @@ static bool_t xdr_dirpath(XDR *xdrs, dirpath *objp)
941static bool_t xdr_fhandle3(XDR *xdrs, fhandle3 *objp) 941static bool_t xdr_fhandle3(XDR *xdrs, fhandle3 *objp)
942{ 942{
943 return xdr_bytes(xdrs, (char **)&objp->fhandle3_val, 943 return xdr_bytes(xdrs, (char **)&objp->fhandle3_val,
944 (unsigned int *) &objp->fhandle3_len, 944 (unsigned int *) &objp->fhandle3_len,
945 FHSIZE3); 945 FHSIZE3);
946} 946}
947 947
948static bool_t xdr_mountres3_ok(XDR *xdrs, mountres3_ok *objp) 948static bool_t xdr_mountres3_ok(XDR *xdrs, mountres3_ok *objp)
@@ -950,10 +950,10 @@ static bool_t xdr_mountres3_ok(XDR *xdrs, mountres3_ok *objp)
950 if (!xdr_fhandle3(xdrs, &objp->fhandle)) 950 if (!xdr_fhandle3(xdrs, &objp->fhandle))
951 return FALSE; 951 return FALSE;
952 return xdr_array(xdrs, &(objp->auth_flavours.auth_flavours_val), 952 return xdr_array(xdrs, &(objp->auth_flavours.auth_flavours_val),
953 &(objp->auth_flavours.auth_flavours_len), 953 &(objp->auth_flavours.auth_flavours_len),
954 ~0, 954 ~0,
955 sizeof(int), 955 sizeof(int),
956 (xdrproc_t) xdr_int); 956 (xdrproc_t) xdr_int);
957} 957}
958 958
959static bool_t xdr_mountstat3(XDR *xdrs, mountstat3 *objp) 959static bool_t xdr_mountstat3(XDR *xdrs, mountstat3 *objp)
@@ -1522,19 +1522,19 @@ static NOINLINE int nfsmount(struct mntent *mp, unsigned long vfsflags, char *fi
1522 switch (pm_mnt.pm_prot) { 1522 switch (pm_mnt.pm_prot) {
1523 case IPPROTO_UDP: 1523 case IPPROTO_UDP:
1524 mclient = clntudp_create(&mount_server_addr, 1524 mclient = clntudp_create(&mount_server_addr,
1525 pm_mnt.pm_prog, 1525 pm_mnt.pm_prog,
1526 pm_mnt.pm_vers, 1526 pm_mnt.pm_vers,
1527 retry_timeout, 1527 retry_timeout,
1528 &msock); 1528 &msock);
1529 if (mclient) 1529 if (mclient)
1530 break; 1530 break;
1531 mount_server_addr.sin_port = htons(pm_mnt.pm_port); 1531 mount_server_addr.sin_port = htons(pm_mnt.pm_port);
1532 msock = RPC_ANYSOCK; 1532 msock = RPC_ANYSOCK;
1533 case IPPROTO_TCP: 1533 case IPPROTO_TCP:
1534 mclient = clnttcp_create(&mount_server_addr, 1534 mclient = clnttcp_create(&mount_server_addr,
1535 pm_mnt.pm_prog, 1535 pm_mnt.pm_prog,
1536 pm_mnt.pm_vers, 1536 pm_mnt.pm_vers,
1537 &msock, 0, 0); 1537 &msock, 0, 0);
1538 break; 1538 break;
1539 default: 1539 default:
1540 mclient = NULL; 1540 mclient = NULL;
@@ -1555,18 +1555,18 @@ static NOINLINE int nfsmount(struct mntent *mp, unsigned long vfsflags, char *fi
1555 1555
1556 if (pm_mnt.pm_vers == 3) 1556 if (pm_mnt.pm_vers == 3)
1557 clnt_stat = clnt_call(mclient, MOUNTPROC3_MNT, 1557 clnt_stat = clnt_call(mclient, MOUNTPROC3_MNT,
1558 (xdrproc_t) xdr_dirpath, 1558 (xdrproc_t) xdr_dirpath,
1559 (caddr_t) &pathname, 1559 (caddr_t) &pathname,
1560 (xdrproc_t) xdr_mountres3, 1560 (xdrproc_t) xdr_mountres3,
1561 (caddr_t) &status, 1561 (caddr_t) &status,
1562 total_timeout); 1562 total_timeout);
1563 else 1563 else
1564 clnt_stat = clnt_call(mclient, MOUNTPROC_MNT, 1564 clnt_stat = clnt_call(mclient, MOUNTPROC_MNT,
1565 (xdrproc_t) xdr_dirpath, 1565 (xdrproc_t) xdr_dirpath,
1566 (caddr_t) &pathname, 1566 (caddr_t) &pathname,
1567 (xdrproc_t) xdr_fhstatus, 1567 (xdrproc_t) xdr_fhstatus,
1568 (caddr_t) &status, 1568 (caddr_t) &status,
1569 total_timeout); 1569 total_timeout);
1570 1570
1571 if (clnt_stat == RPC_SUCCESS) 1571 if (clnt_stat == RPC_SUCCESS)
1572 goto prepare_kernel_data; /* we're done */ 1572 goto prepare_kernel_data; /* we're done */
diff --git a/util-linux/readprofile.c b/util-linux/readprofile.c
index 4ed801137..974fe89c4 100644
--- a/util-linux/readprofile.c
+++ b/util-linux/readprofile.c
@@ -163,7 +163,7 @@ int readprofile_main(int argc UNUSED_PARAM, char **argv)
163 while (fgets(mapline, S_LEN, map)) { 163 while (fgets(mapline, S_LEN, map)) {
164 if (sscanf(mapline, "%llx %s %s", &fn_add, mode, fn_name) != 3) 164 if (sscanf(mapline, "%llx %s %s", &fn_add, mode, fn_name) != 3)
165 bb_error_msg_and_die("%s(%i): wrong map line", 165 bb_error_msg_and_die("%s(%i): wrong map line",
166 mapFile, maplineno); 166 mapFile, maplineno);
167 167
168 if (!strcmp(fn_name, "_stext")) /* only elf works like this */ { 168 if (!strcmp(fn_name, "_stext")) /* only elf works like this */ {
169 add0 = fn_add; 169 add0 = fn_add;
@@ -198,7 +198,7 @@ int readprofile_main(int argc UNUSED_PARAM, char **argv)
198 198
199 if (indx >= len / sizeof(*buf)) 199 if (indx >= len / sizeof(*buf))
200 bb_error_msg_and_die("profile address out of range. " 200 bb_error_msg_and_die("profile address out of range. "
201 "Wrong map file?"); 201 "Wrong map file?");
202 202
203 while (indx < (next_add-add0)/step) { 203 while (indx < (next_add-add0)/step) {
204 if (optBins && (buf[indx] || optAll)) { 204 if (optBins && (buf[indx] || optAll)) {
@@ -220,10 +220,10 @@ int readprofile_main(int argc UNUSED_PARAM, char **argv)
220 ) { 220 ) {
221 if (optVerbose) 221 if (optVerbose)
222 printf("%016llx %-40s %6i %8.4f\n", fn_add, 222 printf("%016llx %-40s %6i %8.4f\n", fn_add,
223 fn_name, this, this/(double)fn_len); 223 fn_name, this, this/(double)fn_len);
224 else 224 else
225 printf("%6i %-40s %8.4f\n", 225 printf("%6i %-40s %8.4f\n",
226 this, fn_name, this/(double)fn_len); 226 this, fn_name, this/(double)fn_len);
227 if (optSub) { 227 if (optSub) {
228 unsigned long long scan; 228 unsigned long long scan;
229 229
@@ -233,8 +233,8 @@ int readprofile_main(int argc UNUSED_PARAM, char **argv)
233 233
234 addr = (scan - 1)*step + add0; 234 addr = (scan - 1)*step + add0;
235 printf("\t%#llx\t%s+%#llx\t%u\n", 235 printf("\t%#llx\t%s+%#llx\t%u\n",
236 addr, fn_name, addr - fn_add, 236 addr, fn_name, addr - fn_add,
237 buf[scan]); 237 buf[scan]);
238 } 238 }
239 } 239 }
240 } 240 }
@@ -251,10 +251,10 @@ int readprofile_main(int argc UNUSED_PARAM, char **argv)
251 /* trailer */ 251 /* trailer */
252 if (optVerbose) 252 if (optVerbose)
253 printf("%016x %-40s %6i %8.4f\n", 253 printf("%016x %-40s %6i %8.4f\n",
254 0, "total", total, total/(double)(fn_add-add0)); 254 0, "total", total, total/(double)(fn_add-add0));
255 else 255 else
256 printf("%6i %-40s %8.4f\n", 256 printf("%6i %-40s %8.4f\n",
257 total, "total", total/(double)(fn_add-add0)); 257 total, "total", total/(double)(fn_add-add0));
258 258
259 fclose(map); 259 fclose(map);
260 free(buf); 260 free(buf);
diff --git a/util-linux/volume_id/linux_raid.c b/util-linux/volume_id/linux_raid.c
index 761e54f9f..209eaabe9 100644
--- a/util-linux/volume_id/linux_raid.c
+++ b/util-linux/volume_id/linux_raid.c
@@ -69,9 +69,9 @@ int FAST_FUNC volume_id_probe_linux_raid(struct volume_id *id /*,uint64_t off*/,
69 volume_id_set_uuid(id, uuid, UUID_DCE); 69 volume_id_set_uuid(id, uuid, UUID_DCE);
70 70
71// snprintf(id->type_version, sizeof(id->type_version)-1, "%u.%u.%u", 71// snprintf(id->type_version, sizeof(id->type_version)-1, "%u.%u.%u",
72// le32_to_cpu(mdp->major_version), 72// le32_to_cpu(mdp->major_version),
73// le32_to_cpu(mdp->minor_version), 73// le32_to_cpu(mdp->minor_version),
74// le32_to_cpu(mdp->patch_version)); 74// le32_to_cpu(mdp->patch_version));
75 75
76 dbg("found raid signature"); 76 dbg("found raid signature");
77// volume_id_set_usage(id, VOLUME_ID_RAID); 77// volume_id_set_usage(id, VOLUME_ID_RAID);
diff --git a/util-linux/volume_id/util.c b/util-linux/volume_id/util.c
index 0e2d24be0..061545fde 100644
--- a/util-linux/volume_id/util.c
+++ b/util-linux/volume_id/util.c
@@ -129,7 +129,7 @@ void volume_id_set_label_string(struct volume_id *id, const uint8_t *buf, size_t
129 129
130void volume_id_set_label_unicode16(struct volume_id *id, const uint8_t *buf, enum endian endianess, size_t count) 130void volume_id_set_label_unicode16(struct volume_id *id, const uint8_t *buf, enum endian endianess, size_t count)
131{ 131{
132 volume_id_set_unicode16(id->label, sizeof(id->label), buf, endianess, count); 132 volume_id_set_unicode16(id->label, sizeof(id->label), buf, endianess, count);
133} 133}
134 134
135void volume_id_set_uuid(struct volume_id *id, const uint8_t *buf, enum uuid_format format) 135void volume_id_set_uuid(struct volume_id *id, const uint8_t *buf, enum uuid_format format)