blob: 8cab2dcc8c7359694b370e9a0bf7bc92fcce84c2 [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 Vlasenkoca525b42007-06-13 12:27:17 +000015const char bb_banner[] = BANNER;
Rob Landley519d7df2006-08-09 20:56:23 +000016
Denis Vlasenko7d219aa2006-10-05 10:17:08 +000017const char bb_msg_memory_exhausted[] = "memory exhausted";
18const char bb_msg_invalid_date[] = "invalid date '%s'";
19const char bb_msg_write_error[] = "write error";
20const char bb_msg_read_error[] = "read error";
Denis Vlasenko7d219aa2006-10-05 10:17:08 +000021const char bb_msg_unknown[] = "(unknown)";
22const char bb_msg_can_not_create_raw_socket[] = "can't create raw socket";
23const char bb_msg_perm_denied_are_you_root[] = "permission denied. (are you root?)";
24const char bb_msg_requires_arg[] = "%s requires an argument";
25const char bb_msg_invalid_arg[] = "invalid argument '%s' to '%s'";
26const char bb_msg_standard_input[] = "standard input";
27const char bb_msg_standard_output[] = "standard output";
Eric Andersen27f64e12002-06-23 04:24:25 +000028
Denis Vlasenko7ca39212006-11-21 20:34:21 +000029const char bb_str_default[] = "default";
Denis Vlasenko3a34d0c2007-01-12 22:10:34 +000030const char bb_hexdigits_upcase[] = "0123456789ABCDEF";
Denis Vlasenko7ca39212006-11-21 20:34:21 +000031
Denis Vlasenko7d219aa2006-10-05 10:17:08 +000032const char bb_path_passwd_file[] = "/etc/passwd";
33const char bb_path_shadow_file[] = "/etc/shadow";
34const char bb_path_group_file[] = "/etc/group";
35const char bb_path_gshadow_file[] = "/etc/gshadow";
Denis Vlasenko7d219aa2006-10-05 10:17:08 +000036const char bb_path_motd_file[] = "/etc/motd";
Denis Vlasenko0b5fd452006-09-19 09:55:09 +000037const char bb_dev_null[] = "/dev/null";
Denis Vlasenkobdbbb7e2007-06-08 15:02:55 +000038const char bb_busybox_exec_path[] = CONFIG_BUSYBOX_EXEC_PATH;
39const char bb_default_login_shell[] = LIBBB_DEFAULT_LOGIN_SHELL;
Denis Vlasenko15611bb2007-06-12 08:52:02 +000040/* util-linux manpage says /sbin:/bin:/usr/sbin:/usr/bin,
41 * but I want to save a few bytes here. Check libbb.h before changing! */
Denis Vlasenkof5f75c52007-06-12 22:35:19 +000042const char bb_PATH_root_path[] = "PATH=/sbin:/usr/sbin:/bin:/usr/bin";
Denis Vlasenko15611bb2007-06-12 08:52:02 +000043
"Vladimir N. Oleynik"86a10732005-10-12 15:21:32 +000044
Denis Vlasenko703e2022007-01-22 14:12:08 +000045const int const_int_0;
46const int const_int_1 = 1;
47
Bernhard Reutner-Fischer781e42d2006-05-26 14:41:40 +000048#include <utmp.h>
49/* This is usually something like "/var/adm/wtmp" or "/var/log/wtmp" */
Denis Vlasenko0b5fd452006-09-19 09:55:09 +000050const char bb_path_wtmp_file[] =
Bernhard Reutner-Fischer781e42d2006-05-26 14:41:40 +000051#if defined _PATH_WTMP
52_PATH_WTMP;
53#elif defined WTMP_FILE
54WTMP_FILE;
55#else
56# error unknown path to wtmp file
57#endif
Bernhard Reutner-Fischer781e42d2006-05-26 14:41:40 +000058
Denis Vlasenko74324c82007-06-04 10:16:52 +000059char bb_common_bufsiz1[COMMON_BUFSIZE];
Denis Vlasenkoda799e82007-03-14 00:06:29 +000060
Denis Vlasenko972288e2007-03-15 00:57:01 +000061struct globals;
Denis Vlasenkobff32ce2007-03-15 19:48:35 +000062/* Make it reside in R/W memory: */
63struct globals *const ptr_to_globals __attribute__ ((section (".data")));