summaryrefslogtreecommitdiff
path: root/libbb/messages.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/messages.c')
-rw-r--r--libbb/messages.c107
1 files changed, 20 insertions, 87 deletions
diff --git a/libbb/messages.c b/libbb/messages.c
index 5aba7e693..bd41216a5 100644
--- a/libbb/messages.c
+++ b/libbb/messages.c
@@ -7,7 +7,6 @@
7 7
8#include "libbb.h" 8#include "libbb.h"
9 9
10#ifdef L_full_version
11#ifndef BB_EXTRA_VERSION 10#ifndef BB_EXTRA_VERSION
12#define BANNER "BusyBox v" BB_VER " (" BB_BT ")" 11#define BANNER "BusyBox v" BB_VER " (" BB_BT ")"
13#else 12#else
@@ -15,92 +14,30 @@
15#endif 14#endif
16const char BB_BANNER[] = BANNER; 15const char BB_BANNER[] = BANNER;
17const char bb_msg_full_version[] = BANNER " multi-call binary"; 16const char bb_msg_full_version[] = BANNER " multi-call binary";
18#endif
19
20#ifdef L_memory_exhausted
21 const char bb_msg_memory_exhausted[] = "memory exhausted";
22#endif
23#ifdef L_invalid_date
24 const char bb_msg_invalid_date[] = "invalid date `%s'";
25#endif
26#ifdef L_io_error
27 const char bb_msg_io_error[] = "%s: input/output error -- %m";
28#endif
29#ifdef L_write_error
30 const char bb_msg_write_error[] = "write error";
31#endif
32#ifdef L_read_error
33 const char bb_msg_read_error[] = "read error";
34#endif
35#ifdef L_name_longer_than_foo
36 const char bb_msg_name_longer_than_foo[] = "names longer than %d chars not supported";
37#endif
38#ifdef L_unknown
39 const char bb_msg_unknown[] = "(unknown)";
40#endif
41#ifdef L_can_not_create_raw_socket
42 const char bb_msg_can_not_create_raw_socket[] = "can't create raw socket";
43#endif
44#ifdef L_perm_denied_are_you_root
45 const char bb_msg_perm_denied_are_you_root[] = "permission denied. (are you root?)";
46#endif
47#ifdef L_msg_requires_arg
48 const char bb_msg_requires_arg[] = "%s requires an argument";
49#endif
50#ifdef L_msg_invalid_arg
51 const char bb_msg_invalid_arg[] = "invalid argument `%s' to `%s'";
52#endif
53#ifdef L_msg_standard_input
54 const char bb_msg_standard_input[] = "standard input";
55#endif
56#ifdef L_msg_standard_output
57 const char bb_msg_standard_output[] = "standard output";
58#endif
59
60#ifdef L_passwd_file
61#define PASSWD_FILE "/etc/passwd"
62const char bb_path_passwd_file[] = PASSWD_FILE;
63#endif
64 17
65#ifdef L_shadow_file 18const char bb_msg_memory_exhausted[] = "memory exhausted";
66#define SHADOW_FILE "/etc/shadow" 19const char bb_msg_invalid_date[] = "invalid date '%s'";
67const char bb_path_shadow_file[] = SHADOW_FILE; 20const char bb_msg_write_error[] = "write error";
68#endif 21const char bb_msg_read_error[] = "read error";
69 22const char bb_msg_name_longer_than_foo[] = "names longer than %d chars not supported";
70#ifdef L_group_file 23const char bb_msg_unknown[] = "(unknown)";
71#define GROUP_FILE "/etc/group" 24const char bb_msg_can_not_create_raw_socket[] = "can't create raw socket";
72const char bb_path_group_file[] = GROUP_FILE; 25const char bb_msg_perm_denied_are_you_root[] = "permission denied. (are you root?)";
73#endif 26const char bb_msg_requires_arg[] = "%s requires an argument";
74 27const char bb_msg_invalid_arg[] = "invalid argument '%s' to '%s'";
75#ifdef L_gshadow_file 28const char bb_msg_standard_input[] = "standard input";
76#define GSHADOW_FILE "/etc/gshadow" 29const char bb_msg_standard_output[] = "standard output";
77const char bb_path_gshadow_file[] = GSHADOW_FILE; 30
78#endif 31const char bb_path_passwd_file[] = "/etc/passwd";
79 32const char bb_path_shadow_file[] = "/etc/shadow";
80#ifdef L_nologin_file 33const char bb_path_group_file[] = "/etc/group";
81#define NOLOGIN_FILE "/etc/nologin" 34const char bb_path_gshadow_file[] = "/etc/gshadow";
82const char bb_path_nologin_file[] = NOLOGIN_FILE; 35const char bb_path_nologin_file[] = "/etc/nologin";
83#endif 36const char bb_path_securetty_file[] = "/etc/securetty";
84 37const char bb_path_motd_file[] = "/etc/motd";
85#ifdef L_securetty_file
86#define SECURETTY_FILE "/etc/securetty"
87const char bb_path_securetty_file[] = SECURETTY_FILE;
88#endif
89
90#ifdef L_motd_file
91#define MOTD_FILE "/etc/motd"
92const char bb_path_motd_file[] = MOTD_FILE;
93#endif
94
95#ifdef L_shell_file
96const char bb_default_login_shell[] = LIBBB_DEFAULT_LOGIN_SHELL; 38const char bb_default_login_shell[] = LIBBB_DEFAULT_LOGIN_SHELL;
97#endif
98
99#ifdef L_bb_dev_null
100const char bb_dev_null[] = "/dev/null"; 39const char bb_dev_null[] = "/dev/null";
101#endif
102 40
103#ifdef L_bb_path_wtmp_file
104#include <utmp.h> 41#include <utmp.h>
105/* This is usually something like "/var/adm/wtmp" or "/var/log/wtmp" */ 42/* This is usually something like "/var/adm/wtmp" or "/var/log/wtmp" */
106const char bb_path_wtmp_file[] = 43const char bb_path_wtmp_file[] =
@@ -111,9 +48,5 @@ WTMP_FILE;
111#else 48#else
112# error unknown path to wtmp file 49# error unknown path to wtmp file
113#endif 50#endif
114#endif
115 51
116
117#ifdef L_bb_common_bufsiz1
118char bb_common_bufsiz1[BUFSIZ+1]; 52char bb_common_bufsiz1[BUFSIZ+1];
119#endif