blob: 3febe76457166a8dadb0974c945e995fe9e4afdb [file] [log] [blame]
Eric Andersen04095e52001-04-25 05:39:18 +00001/* vi: set sw=4 ts=4: */
2/*
Eric Andersenc7bda1c2004-03-15 08:29:22 +00003 * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
Eric Andersen04095e52001-04-25 05:39:18 +00004 *
Bernhard Reutner-Fischer421d9e52006-04-03 16:39:31 +00005 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
Eric Andersen04095e52001-04-25 05:39:18 +00006 */
7
Mark Whitleyc29c44c2001-04-25 18:06:21 +00008#include "libbb.h"
Eric Andersen04095e52001-04-25 05:39:18 +00009
"Vladimir N. Oleynik"dd1ccdd2006-02-16 15:40:24 +000010#ifndef BB_EXTRA_VERSION
Rob Landley519d7df2006-08-09 20:56:23 +000011#define BANNER "BusyBox v" BB_VER " (" BB_BT ")"
"Vladimir N. Oleynik"dd1ccdd2006-02-16 15:40:24 +000012#else
Rob Landley519d7df2006-08-09 20:56:23 +000013#define BANNER "BusyBox v" BB_VER " (" BB_EXTRA_VERSION ")"
"Vladimir N. Oleynik"dd1ccdd2006-02-16 15:40:24 +000014#endif
Denis Vlasenko0b5fd452006-09-19 09:55:09 +000015const char BB_BANNER[] = BANNER;
16const char bb_msg_full_version[] = BANNER " multi-call binary";
Rob Landley519d7df2006-08-09 20:56:23 +000017
Denis Vlasenko7d219aa2006-10-05 10:17:08 +000018const char bb_msg_memory_exhausted[] = "memory exhausted";
19const char bb_msg_invalid_date[] = "invalid date '%s'";
20const char bb_msg_write_error[] = "write error";
21const char bb_msg_read_error[] = "read error";
Denis Vlasenko7d219aa2006-10-05 10:17:08 +000022const char bb_msg_unknown[] = "(unknown)";
23const char bb_msg_can_not_create_raw_socket[] = "can't create raw socket";
24const char bb_msg_perm_denied_are_you_root[] = "permission denied. (are you root?)";
25const char bb_msg_requires_arg[] = "%s requires an argument";
26const char bb_msg_invalid_arg[] = "invalid argument '%s' to '%s'";
27const char bb_msg_standard_input[] = "standard input";
28const char bb_msg_standard_output[] = "standard output";
Eric Andersen27f64e12002-06-23 04:24:25 +000029
Denis Vlasenko7ca39212006-11-21 20:34:21 +000030const char bb_str_default[] = "default";
Denis Vlasenko3a34d0c2007-01-12 22:10:34 +000031const char bb_hexdigits_upcase[] = "0123456789ABCDEF";
Denis Vlasenko7ca39212006-11-21 20:34:21 +000032
Denis Vlasenko7d219aa2006-10-05 10:17:08 +000033const char bb_path_passwd_file[] = "/etc/passwd";
34const char bb_path_shadow_file[] = "/etc/shadow";
35const char bb_path_group_file[] = "/etc/group";
36const char bb_path_gshadow_file[] = "/etc/gshadow";
37const char bb_path_nologin_file[] = "/etc/nologin";
38const char bb_path_securetty_file[] = "/etc/securetty";
39const char bb_path_motd_file[] = "/etc/motd";
Denis Vlasenko0b5fd452006-09-19 09:55:09 +000040const char bb_default_login_shell[] = LIBBB_DEFAULT_LOGIN_SHELL;
Denis Vlasenko0b5fd452006-09-19 09:55:09 +000041const char bb_dev_null[] = "/dev/null";
"Vladimir N. Oleynik"86a10732005-10-12 15:21:32 +000042
Denis Vlasenko703e2022007-01-22 14:12:08 +000043const int const_int_0;
44const int const_int_1 = 1;
45
Bernhard Reutner-Fischer781e42d2006-05-26 14:41:40 +000046#include <utmp.h>
47/* This is usually something like "/var/adm/wtmp" or "/var/log/wtmp" */
Denis Vlasenko0b5fd452006-09-19 09:55:09 +000048const char bb_path_wtmp_file[] =
Bernhard Reutner-Fischer781e42d2006-05-26 14:41:40 +000049#if defined _PATH_WTMP
50_PATH_WTMP;
51#elif defined WTMP_FILE
52WTMP_FILE;
53#else
54# error unknown path to wtmp file
55#endif
Bernhard Reutner-Fischer781e42d2006-05-26 14:41:40 +000056
Denis Vlasenko85818632007-04-19 14:47:11 +000057char bb_common_bufsiz1[(BUFSIZ > 256*sizeof(void*) ? BUFSIZ : 256*sizeof(void*)) + 1];
Denis Vlasenkoda799e82007-03-14 00:06:29 +000058
Denis Vlasenko972288e2007-03-15 00:57:01 +000059struct globals;
Denis Vlasenkobff32ce2007-03-15 19:48:35 +000060/* Make it reside in R/W memory: */
61struct globals *const ptr_to_globals __attribute__ ((section (".data")));