aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2006-09-19 09:55:09 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2006-09-19 09:55:09 +0000
commit0b5fd45ef71fd24bf4a0c82820543bb66a5faba1 (patch)
tree4995ecb1539acf19c0dd8bb4eccfde875a961ce3
parent9213a9e0f2d8fd638ecd02e2628d96dd5c7d233e (diff)
downloadbusybox-w32-0b5fd45ef71fd24bf4a0c82820543bb66a5faba1.tar.gz
busybox-w32-0b5fd45ef71fd24bf4a0c82820543bb66a5faba1.tar.bz2
busybox-w32-0b5fd45ef71fd24bf4a0c82820543bb66a5faba1.zip
change char *string = "foo" -> char string[] = "foo"
function old new delta xsetenv 45 44 -1 iproute_list_or_flush 1834 1833 -1 ipaddr_modify 1915 1914 -1 ipaddr_list_or_flush 1861 1860 -1 invarg 39 38 -1 do_set 1259 1258 -1 bb_verror_msg 268 267 -1 create_icmp_socket 142 140 -2 create_icmp6_socket 142 140 -2 bb_full_fd_action 324 322 -2 bb_path_mtab_file 10 - -10 .rodata 214796 214720 -76 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 0/11 up/down: 0/-99) Total: -99 bytes
-rw-r--r--include/libbb.h52
-rw-r--r--libbb/messages.c50
-rw-r--r--libbb/mtab_file.c4
3 files changed, 53 insertions, 53 deletions
diff --git a/include/libbb.h b/include/libbb.h
index eee7d7dfa..86e88bf89 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -369,30 +369,30 @@ enum { /* DO NOT CHANGE THESE VALUES! cp.c depends on them. */
369 369
370extern const char *bb_applet_name; 370extern const char *bb_applet_name;
371 371
372extern const char * const bb_msg_full_version; 372extern const char bb_msg_full_version[];
373extern const char * const bb_msg_memory_exhausted; 373extern const char bb_msg_memory_exhausted[];
374extern const char * const bb_msg_invalid_date; 374extern const char bb_msg_invalid_date[];
375extern const char * const bb_msg_io_error; 375extern const char bb_msg_io_error[];
376extern const char * const bb_msg_read_error; 376extern const char bb_msg_read_error[];
377extern const char * const bb_msg_write_error; 377extern const char bb_msg_write_error[];
378extern const char * const bb_msg_name_longer_than_foo; 378extern const char bb_msg_name_longer_than_foo[];
379extern const char * const bb_msg_unknown; 379extern const char bb_msg_unknown[];
380extern const char * const bb_msg_can_not_create_raw_socket; 380extern const char bb_msg_can_not_create_raw_socket[];
381extern const char * const bb_msg_perm_denied_are_you_root; 381extern const char bb_msg_perm_denied_are_you_root[];
382extern const char * const bb_msg_requires_arg; 382extern const char bb_msg_requires_arg[];
383extern const char * const bb_msg_invalid_arg; 383extern const char bb_msg_invalid_arg[];
384extern const char * const bb_msg_standard_input; 384extern const char bb_msg_standard_input[];
385extern const char * const bb_msg_standard_output; 385extern const char bb_msg_standard_output[];
386 386
387extern const char * const bb_path_nologin_file; 387extern const char bb_path_nologin_file[];
388extern const char * const bb_path_passwd_file; 388extern const char bb_path_passwd_file[];
389extern const char * const bb_path_shadow_file; 389extern const char bb_path_shadow_file[];
390extern const char * const bb_path_gshadow_file; 390extern const char bb_path_gshadow_file[];
391extern const char * const bb_path_group_file; 391extern const char bb_path_group_file[];
392extern const char * const bb_path_securetty_file; 392extern const char bb_path_securetty_file[];
393extern const char * const bb_path_motd_file; 393extern const char bb_path_motd_file[];
394extern const char * const bb_path_wtmp_file; 394extern const char bb_path_wtmp_file[];
395extern const char * const bb_dev_null; 395extern const char bb_dev_null[];
396 396
397#ifndef BUFSIZ 397#ifndef BUFSIZ
398#define BUFSIZ 4096 398#define BUFSIZ 4096
@@ -407,14 +407,14 @@ extern char bb_common_bufsiz1[BUFSIZ+1];
407 */ 407 */
408#define LIBBB_DEFAULT_LOGIN_SHELL "-/bin/sh" 408#define LIBBB_DEFAULT_LOGIN_SHELL "-/bin/sh"
409 409
410extern const char * const bb_default_login_shell; 410extern const char bb_default_login_shell[];
411/* "/bin/sh" */ 411/* "/bin/sh" */
412#define DEFAULT_SHELL (bb_default_login_shell+1) 412#define DEFAULT_SHELL (bb_default_login_shell+1)
413/* "sh" */ 413/* "sh" */
414#define DEFAULT_SHELL_SHORT_NAME (bb_default_login_shell+6) 414#define DEFAULT_SHELL_SHORT_NAME (bb_default_login_shell+6)
415 415
416 416
417extern char bb_path_mtab_file[]; 417extern const char bb_path_mtab_file[];
418 418
419extern int bb_default_error_retval; 419extern int bb_default_error_retval;
420 420
diff --git a/libbb/messages.c b/libbb/messages.c
index b6755058e..5aba7e693 100644
--- a/libbb/messages.c
+++ b/libbb/messages.c
@@ -13,97 +13,97 @@
13#else 13#else
14#define BANNER "BusyBox v" BB_VER " (" BB_EXTRA_VERSION ")" 14#define BANNER "BusyBox v" BB_VER " (" BB_EXTRA_VERSION ")"
15#endif 15#endif
16const char BB_BANNER[]=BANNER; 16const char BB_BANNER[] = BANNER;
17const char * const bb_msg_full_version = BANNER " multi-call binary"; 17const char bb_msg_full_version[] = BANNER " multi-call binary";
18#endif 18#endif
19 19
20#ifdef L_memory_exhausted 20#ifdef L_memory_exhausted
21 const char * const bb_msg_memory_exhausted = "memory exhausted"; 21 const char bb_msg_memory_exhausted[] = "memory exhausted";
22#endif 22#endif
23#ifdef L_invalid_date 23#ifdef L_invalid_date
24 const char * const bb_msg_invalid_date = "invalid date `%s'"; 24 const char bb_msg_invalid_date[] = "invalid date `%s'";
25#endif 25#endif
26#ifdef L_io_error 26#ifdef L_io_error
27 const char * const bb_msg_io_error = "%s: input/output error -- %m"; 27 const char bb_msg_io_error[] = "%s: input/output error -- %m";
28#endif 28#endif
29#ifdef L_write_error 29#ifdef L_write_error
30 const char * const bb_msg_write_error = "Write Error"; 30 const char bb_msg_write_error[] = "write error";
31#endif 31#endif
32#ifdef L_read_error 32#ifdef L_read_error
33 const char * const bb_msg_read_error = "Read Error"; 33 const char bb_msg_read_error[] = "read error";
34#endif 34#endif
35#ifdef L_name_longer_than_foo 35#ifdef L_name_longer_than_foo
36 const char * const bb_msg_name_longer_than_foo = "Names longer than %d chars not supported."; 36 const char bb_msg_name_longer_than_foo[] = "names longer than %d chars not supported";
37#endif 37#endif
38#ifdef L_unknown 38#ifdef L_unknown
39 const char * const bb_msg_unknown = "(unknown)"; 39 const char bb_msg_unknown[] = "(unknown)";
40#endif 40#endif
41#ifdef L_can_not_create_raw_socket 41#ifdef L_can_not_create_raw_socket
42 const char * const bb_msg_can_not_create_raw_socket = "can't create raw socket"; 42 const char bb_msg_can_not_create_raw_socket[] = "can't create raw socket";
43#endif 43#endif
44#ifdef L_perm_denied_are_you_root 44#ifdef L_perm_denied_are_you_root
45 const char * const bb_msg_perm_denied_are_you_root = "permission denied. (are you root?)"; 45 const char bb_msg_perm_denied_are_you_root[] = "permission denied. (are you root?)";
46#endif 46#endif
47#ifdef L_msg_requires_arg 47#ifdef L_msg_requires_arg
48 const char * const bb_msg_requires_arg = "%s requires an argument"; 48 const char bb_msg_requires_arg[] = "%s requires an argument";
49#endif 49#endif
50#ifdef L_msg_invalid_arg 50#ifdef L_msg_invalid_arg
51 const char * const bb_msg_invalid_arg = "invalid argument `%s' to `%s'"; 51 const char bb_msg_invalid_arg[] = "invalid argument `%s' to `%s'";
52#endif 52#endif
53#ifdef L_msg_standard_input 53#ifdef L_msg_standard_input
54 const char * const bb_msg_standard_input = "standard input"; 54 const char bb_msg_standard_input[] = "standard input";
55#endif 55#endif
56#ifdef L_msg_standard_output 56#ifdef L_msg_standard_output
57 const char * const bb_msg_standard_output = "standard output"; 57 const char bb_msg_standard_output[] = "standard output";
58#endif 58#endif
59 59
60#ifdef L_passwd_file 60#ifdef L_passwd_file
61#define PASSWD_FILE "/etc/passwd" 61#define PASSWD_FILE "/etc/passwd"
62const char * const bb_path_passwd_file = PASSWD_FILE; 62const char bb_path_passwd_file[] = PASSWD_FILE;
63#endif 63#endif
64 64
65#ifdef L_shadow_file 65#ifdef L_shadow_file
66#define SHADOW_FILE "/etc/shadow" 66#define SHADOW_FILE "/etc/shadow"
67const char * const bb_path_shadow_file = SHADOW_FILE; 67const char bb_path_shadow_file[] = SHADOW_FILE;
68#endif 68#endif
69 69
70#ifdef L_group_file 70#ifdef L_group_file
71#define GROUP_FILE "/etc/group" 71#define GROUP_FILE "/etc/group"
72const char * const bb_path_group_file = GROUP_FILE; 72const char bb_path_group_file[] = GROUP_FILE;
73#endif 73#endif
74 74
75#ifdef L_gshadow_file 75#ifdef L_gshadow_file
76#define GSHADOW_FILE "/etc/gshadow" 76#define GSHADOW_FILE "/etc/gshadow"
77const char * const bb_path_gshadow_file = GSHADOW_FILE; 77const char bb_path_gshadow_file[] = GSHADOW_FILE;
78#endif 78#endif
79 79
80#ifdef L_nologin_file 80#ifdef L_nologin_file
81#define NOLOGIN_FILE "/etc/nologin" 81#define NOLOGIN_FILE "/etc/nologin"
82const char * const bb_path_nologin_file = NOLOGIN_FILE; 82const char bb_path_nologin_file[] = NOLOGIN_FILE;
83#endif 83#endif
84 84
85#ifdef L_securetty_file 85#ifdef L_securetty_file
86#define SECURETTY_FILE "/etc/securetty" 86#define SECURETTY_FILE "/etc/securetty"
87const char * const bb_path_securetty_file = SECURETTY_FILE; 87const char bb_path_securetty_file[] = SECURETTY_FILE;
88#endif 88#endif
89 89
90#ifdef L_motd_file 90#ifdef L_motd_file
91#define MOTD_FILE "/etc/motd" 91#define MOTD_FILE "/etc/motd"
92const char * const bb_path_motd_file = MOTD_FILE; 92const char bb_path_motd_file[] = MOTD_FILE;
93#endif 93#endif
94 94
95#ifdef L_shell_file 95#ifdef L_shell_file
96const char * const bb_default_login_shell = LIBBB_DEFAULT_LOGIN_SHELL; 96const char bb_default_login_shell[] = LIBBB_DEFAULT_LOGIN_SHELL;
97#endif 97#endif
98 98
99#ifdef L_bb_dev_null 99#ifdef L_bb_dev_null
100const char * const bb_dev_null = "/dev/null"; 100const char bb_dev_null[] = "/dev/null";
101#endif 101#endif
102 102
103#ifdef L_bb_path_wtmp_file 103#ifdef L_bb_path_wtmp_file
104#include <utmp.h> 104#include <utmp.h>
105/* This is usually something like "/var/adm/wtmp" or "/var/log/wtmp" */ 105/* This is usually something like "/var/adm/wtmp" or "/var/log/wtmp" */
106const char * const bb_path_wtmp_file = 106const char bb_path_wtmp_file[] =
107#if defined _PATH_WTMP 107#if defined _PATH_WTMP
108_PATH_WTMP; 108_PATH_WTMP;
109#elif defined WTMP_FILE 109#elif defined WTMP_FILE
diff --git a/libbb/mtab_file.c b/libbb/mtab_file.c
index 92bd2394f..3181d6d58 100644
--- a/libbb/mtab_file.c
+++ b/libbb/mtab_file.c
@@ -13,5 +13,5 @@
13 13
14/* Busybox mount uses either /proc/mounts or /etc/mtab to 14/* Busybox mount uses either /proc/mounts or /etc/mtab to
15 * get the list of currently mounted filesystems */ 15 * get the list of currently mounted filesystems */
16char bb_path_mtab_file[] = USE_FEATURE_MTAB_SUPPORT("/etc/mtab") 16const char bb_path_mtab_file[] = USE_FEATURE_MTAB_SUPPORT("/etc/mtab")
17 SKIP_FEATURE_MTAB_SUPPORT("/proc/mounts"); 17 SKIP_FEATURE_MTAB_SUPPORT("/proc/mounts");