Eric Andersen | 04095e5 | 2001-04-25 05:39:18 +0000 | [diff] [blame] | 1 | /* vi: set sw=4 ts=4: */ |
| 2 | /* |
Eric Andersen | c7bda1c | 2004-03-15 08:29:22 +0000 | [diff] [blame] | 3 | * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
Eric Andersen | 04095e5 | 2001-04-25 05:39:18 +0000 | [diff] [blame] | 4 | * |
Bernhard Reutner-Fischer | 421d9e5 | 2006-04-03 16:39:31 +0000 | [diff] [blame] | 5 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. |
Eric Andersen | 04095e5 | 2001-04-25 05:39:18 +0000 | [diff] [blame] | 6 | */ |
| 7 | |
Mark Whitley | c29c44c | 2001-04-25 18:06:21 +0000 | [diff] [blame] | 8 | #include "libbb.h" |
Eric Andersen | 04095e5 | 2001-04-25 05:39:18 +0000 | [diff] [blame] | 9 | |
| 10 | #ifdef L_full_version |
"Vladimir N. Oleynik" | dd1ccdd | 2006-02-16 15:40:24 +0000 | [diff] [blame] | 11 | #ifndef BB_EXTRA_VERSION |
| 12 | #define LIBBB_BANNER "BusyBox's library v" BB_VER " (" BB_BT ")" |
| 13 | #else |
| 14 | #define LIBBB_BANNER "BusyBox's library v" BB_VER " (" BB_EXTRA_VERSION ")" |
| 15 | #endif |
| 16 | const char * const libbb_msg_full_version = LIBBB_BANNER; |
Eric Andersen | 04095e5 | 2001-04-25 05:39:18 +0000 | [diff] [blame] | 17 | #endif |
| 18 | #ifdef L_memory_exhausted |
Manuel Novoa III | cad5364 | 2003-03-19 09:13:01 +0000 | [diff] [blame] | 19 | const char * const bb_msg_memory_exhausted = "memory exhausted"; |
Eric Andersen | 04095e5 | 2001-04-25 05:39:18 +0000 | [diff] [blame] | 20 | #endif |
| 21 | #ifdef L_invalid_date |
Manuel Novoa III | cad5364 | 2003-03-19 09:13:01 +0000 | [diff] [blame] | 22 | const char * const bb_msg_invalid_date = "invalid date `%s'"; |
Eric Andersen | 04095e5 | 2001-04-25 05:39:18 +0000 | [diff] [blame] | 23 | #endif |
| 24 | #ifdef L_io_error |
Manuel Novoa III | cad5364 | 2003-03-19 09:13:01 +0000 | [diff] [blame] | 25 | const char * const bb_msg_io_error = "%s: input/output error -- %m"; |
Eric Andersen | 04095e5 | 2001-04-25 05:39:18 +0000 | [diff] [blame] | 26 | #endif |
| 27 | #ifdef L_write_error |
Manuel Novoa III | cad5364 | 2003-03-19 09:13:01 +0000 | [diff] [blame] | 28 | const char * const bb_msg_write_error = "Write Error"; |
Eric Andersen | 04095e5 | 2001-04-25 05:39:18 +0000 | [diff] [blame] | 29 | #endif |
Eric Andersen | 3cd1986 | 2005-04-16 07:42:35 +0000 | [diff] [blame] | 30 | #ifdef L_read_error |
| 31 | const char * const bb_msg_read_error = "Read Error"; |
| 32 | #endif |
Eric Andersen | 04095e5 | 2001-04-25 05:39:18 +0000 | [diff] [blame] | 33 | #ifdef L_name_longer_than_foo |
Manuel Novoa III | cad5364 | 2003-03-19 09:13:01 +0000 | [diff] [blame] | 34 | const char * const bb_msg_name_longer_than_foo = "Names longer than %d chars not supported."; |
Eric Andersen | 04095e5 | 2001-04-25 05:39:18 +0000 | [diff] [blame] | 35 | #endif |
Eric Andersen | 5f265b7 | 2001-05-11 16:58:46 +0000 | [diff] [blame] | 36 | #ifdef L_unknown |
Manuel Novoa III | cad5364 | 2003-03-19 09:13:01 +0000 | [diff] [blame] | 37 | const char * const bb_msg_unknown = "(unknown)"; |
Eric Andersen | 5f265b7 | 2001-05-11 16:58:46 +0000 | [diff] [blame] | 38 | #endif |
Eric Andersen | 7467c8d | 2001-07-12 20:26:32 +0000 | [diff] [blame] | 39 | #ifdef L_can_not_create_raw_socket |
Bernhard Reutner-Fischer | 19008b8 | 2006-06-07 20:17:41 +0000 | [diff] [blame] | 40 | const char * const bb_msg_can_not_create_raw_socket = "can't create raw socket"; |
Manuel Novoa III | cad5364 | 2003-03-19 09:13:01 +0000 | [diff] [blame] | 41 | #endif |
| 42 | #ifdef L_perm_denied_are_you_root |
| 43 | const char * const bb_msg_perm_denied_are_you_root = "permission denied. (are you root?)"; |
| 44 | #endif |
Bernhard Reutner-Fischer | 19008b8 | 2006-06-07 20:17:41 +0000 | [diff] [blame] | 45 | #ifdef L_msg_requires_arg |
| 46 | const char * const bb_msg_requires_arg = "%s requires an argument"; |
| 47 | #endif |
| 48 | #ifdef L_msg_invalid_arg |
| 49 | const char * const bb_msg_invalid_arg = "invalid argument `%s' to `%s'"; |
| 50 | #endif |
Manuel Novoa III | cad5364 | 2003-03-19 09:13:01 +0000 | [diff] [blame] | 51 | #ifdef L_msg_standard_input |
| 52 | const char * const bb_msg_standard_input = "standard input"; |
| 53 | #endif |
| 54 | #ifdef L_msg_standard_output |
| 55 | const char * const bb_msg_standard_output = "standard output"; |
Eric Andersen | 7467c8d | 2001-07-12 20:26:32 +0000 | [diff] [blame] | 56 | #endif |
Eric Andersen | 27f64e1 | 2002-06-23 04:24:25 +0000 | [diff] [blame] | 57 | |
| 58 | #ifdef L_passwd_file |
| 59 | #define PASSWD_FILE "/etc/passwd" |
Manuel Novoa III | cad5364 | 2003-03-19 09:13:01 +0000 | [diff] [blame] | 60 | const char * const bb_path_passwd_file = PASSWD_FILE; |
Eric Andersen | 27f64e1 | 2002-06-23 04:24:25 +0000 | [diff] [blame] | 61 | #endif |
| 62 | |
| 63 | #ifdef L_shadow_file |
| 64 | #define SHADOW_FILE "/etc/shadow" |
Manuel Novoa III | cad5364 | 2003-03-19 09:13:01 +0000 | [diff] [blame] | 65 | const char * const bb_path_shadow_file = SHADOW_FILE; |
Eric Andersen | 27f64e1 | 2002-06-23 04:24:25 +0000 | [diff] [blame] | 66 | #endif |
| 67 | |
| 68 | #ifdef L_group_file |
| 69 | #define GROUP_FILE "/etc/group" |
Manuel Novoa III | cad5364 | 2003-03-19 09:13:01 +0000 | [diff] [blame] | 70 | const char * const bb_path_group_file = GROUP_FILE; |
Eric Andersen | 27f64e1 | 2002-06-23 04:24:25 +0000 | [diff] [blame] | 71 | #endif |
| 72 | |
| 73 | #ifdef L_gshadow_file |
| 74 | #define GSHADOW_FILE "/etc/gshadow" |
Manuel Novoa III | cad5364 | 2003-03-19 09:13:01 +0000 | [diff] [blame] | 75 | const char * const bb_path_gshadow_file = GSHADOW_FILE; |
Eric Andersen | 27f64e1 | 2002-06-23 04:24:25 +0000 | [diff] [blame] | 76 | #endif |
| 77 | |
| 78 | #ifdef L_nologin_file |
| 79 | #define NOLOGIN_FILE "/etc/nologin" |
Manuel Novoa III | cad5364 | 2003-03-19 09:13:01 +0000 | [diff] [blame] | 80 | const char * const bb_path_nologin_file = NOLOGIN_FILE; |
Eric Andersen | 27f64e1 | 2002-06-23 04:24:25 +0000 | [diff] [blame] | 81 | #endif |
| 82 | |
| 83 | #ifdef L_securetty_file |
| 84 | #define SECURETTY_FILE "/etc/securetty" |
Manuel Novoa III | cad5364 | 2003-03-19 09:13:01 +0000 | [diff] [blame] | 85 | const char * const bb_path_securetty_file = SECURETTY_FILE; |
Eric Andersen | 27f64e1 | 2002-06-23 04:24:25 +0000 | [diff] [blame] | 86 | #endif |
| 87 | |
| 88 | #ifdef L_motd_file |
| 89 | #define MOTD_FILE "/etc/motd" |
Manuel Novoa III | cad5364 | 2003-03-19 09:13:01 +0000 | [diff] [blame] | 90 | const char * const bb_path_motd_file = MOTD_FILE; |
Eric Andersen | 27f64e1 | 2002-06-23 04:24:25 +0000 | [diff] [blame] | 91 | #endif |
| 92 | |
Glenn L McGrath | dc4e75e | 2003-09-02 02:36:18 +0000 | [diff] [blame] | 93 | #ifdef L_shell_file |
| 94 | const char * const bb_default_login_shell = LIBBB_DEFAULT_LOGIN_SHELL; |
| 95 | #endif |
| 96 | |
"Vladimir N. Oleynik" | 6c35c7c | 2005-10-12 15:34:25 +0000 | [diff] [blame] | 97 | #ifdef L_bb_dev_null |
| 98 | const char * const bb_dev_null = "/dev/null"; |
"Vladimir N. Oleynik" | 86a1073 | 2005-10-12 15:21:32 +0000 | [diff] [blame] | 99 | #endif |
| 100 | |
Bernhard Reutner-Fischer | 781e42d | 2006-05-26 14:41:40 +0000 | [diff] [blame] | 101 | #ifdef L_bb_path_wtmp_file |
| 102 | #include <utmp.h> |
| 103 | /* This is usually something like "/var/adm/wtmp" or "/var/log/wtmp" */ |
| 104 | const char * const bb_path_wtmp_file = |
| 105 | #if defined _PATH_WTMP |
| 106 | _PATH_WTMP; |
| 107 | #elif defined WTMP_FILE |
| 108 | WTMP_FILE; |
| 109 | #else |
| 110 | # error unknown path to wtmp file |
| 111 | #endif |
| 112 | #endif |
| 113 | |
| 114 | |
"Vladimir N. Oleynik" | 6f347ef | 2005-10-15 10:23:55 +0000 | [diff] [blame] | 115 | #ifdef L_bb_common_bufsiz1 |
| 116 | char bb_common_bufsiz1[BUFSIZ+1]; |
| 117 | #endif |