diff options
author | Ron Yorston <rmy@pobox.com> | 2012-09-07 11:48:25 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2012-09-07 11:48:25 +0100 |
commit | fecf687cc358883de2da21de33346f0df204c80b (patch) | |
tree | d22c606157926fb659374ae68d55e3a874bacf25 /include/libbb.h | |
parent | b25a7c28a0f684087fa6ccbbc7e265a9cac0f0fa (diff) | |
parent | 6d463de46b418e6c4c8d1397033608f78b33ab21 (diff) | |
download | busybox-w32-fecf687cc358883de2da21de33346f0df204c80b.tar.gz busybox-w32-fecf687cc358883de2da21de33346f0df204c80b.tar.bz2 busybox-w32-fecf687cc358883de2da21de33346f0df204c80b.zip |
Merge branch 'busybox' into merge
Conflicts:
include/libbb.h
shell/ash.c
Diffstat (limited to 'include/libbb.h')
-rw-r--r-- | include/libbb.h | 46 |
1 files changed, 24 insertions, 22 deletions
diff --git a/include/libbb.h b/include/libbb.h index a78772b6a..5012209f8 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -346,6 +346,7 @@ enum { /* DO NOT CHANGE THESE VALUES! cp.c, mv.c, install.c depend on them. */ | |||
346 | FILEUTILS_PRESERVE_SECURITY_CONTEXT = 1 << 9, /* -c */ | 346 | FILEUTILS_PRESERVE_SECURITY_CONTEXT = 1 << 9, /* -c */ |
347 | FILEUTILS_SET_SECURITY_CONTEXT = 1 << 10, | 347 | FILEUTILS_SET_SECURITY_CONTEXT = 1 << 10, |
348 | #endif | 348 | #endif |
349 | FILEUTILS_IGNORE_CHMOD_ERR = 1 << 11, | ||
349 | }; | 350 | }; |
350 | #define FILEUTILS_CP_OPTSTR "pdRfilsLH" IF_SELINUX("c") | 351 | #define FILEUTILS_CP_OPTSTR "pdRfilsLH" IF_SELINUX("c") |
351 | extern int remove_file(const char *path, int flags) FAST_FUNC; | 352 | extern int remove_file(const char *path, int flags) FAST_FUNC; |
@@ -1301,6 +1302,7 @@ int sd_listen_fds(void); | |||
1301 | #define SETUP_ENV_CHANGEENV (1 << 0) | 1302 | #define SETUP_ENV_CHANGEENV (1 << 0) |
1302 | #define SETUP_ENV_CLEARENV (1 << 1) | 1303 | #define SETUP_ENV_CLEARENV (1 << 1) |
1303 | #define SETUP_ENV_TO_TMP (1 << 2) | 1304 | #define SETUP_ENV_TO_TMP (1 << 2) |
1305 | #define SETUP_ENV_NO_CHDIR (1 << 4) | ||
1304 | extern void setup_environment(const char *shell, int flags, const struct passwd *pw) FAST_FUNC; | 1306 | extern void setup_environment(const char *shell, int flags, const struct passwd *pw) FAST_FUNC; |
1305 | extern int correct_password(const struct passwd *pw) FAST_FUNC; | 1307 | extern int correct_password(const struct passwd *pw) FAST_FUNC; |
1306 | /* Returns a malloced string */ | 1308 | /* Returns a malloced string */ |
@@ -1629,8 +1631,8 @@ unsigned get_cpu_count(void) FAST_FUNC; | |||
1629 | char *percent_decode_in_place(char *str, int strict) FAST_FUNC; | 1631 | char *percent_decode_in_place(char *str, int strict) FAST_FUNC; |
1630 | 1632 | ||
1631 | 1633 | ||
1632 | extern const char bb_uuenc_tbl_base64[]; | 1634 | extern const char bb_uuenc_tbl_base64[] ALIGN1; |
1633 | extern const char bb_uuenc_tbl_std[]; | 1635 | extern const char bb_uuenc_tbl_std[] ALIGN1; |
1634 | void bb_uuencode(char *store, const void *s, int length, const char *tbl) FAST_FUNC; | 1636 | void bb_uuencode(char *store, const void *s, int length, const char *tbl) FAST_FUNC; |
1635 | enum { | 1637 | enum { |
1636 | BASE64_FLAG_UU_STOP = 0x100, | 1638 | BASE64_FLAG_UU_STOP = 0x100, |
@@ -1711,29 +1713,24 @@ extern const char *applet_name; | |||
1711 | * Therefore now we use #defines. | 1713 | * Therefore now we use #defines. |
1712 | */ | 1714 | */ |
1713 | /* "BusyBox vN.N.N (timestamp or extra_version)" */ | 1715 | /* "BusyBox vN.N.N (timestamp or extra_version)" */ |
1714 | extern const char bb_banner[]; | 1716 | extern const char bb_banner[] ALIGN1; |
1715 | extern const char bb_msg_memory_exhausted[]; | 1717 | extern const char bb_msg_memory_exhausted[] ALIGN1; |
1716 | extern const char bb_msg_invalid_date[]; | 1718 | extern const char bb_msg_invalid_date[] ALIGN1; |
1717 | #define bb_msg_read_error "read error" | 1719 | #define bb_msg_read_error "read error" |
1718 | #define bb_msg_write_error "write error" | 1720 | #define bb_msg_write_error "write error" |
1719 | extern const char bb_msg_unknown[]; | 1721 | extern const char bb_msg_unknown[] ALIGN1; |
1720 | extern const char bb_msg_can_not_create_raw_socket[]; | 1722 | extern const char bb_msg_can_not_create_raw_socket[] ALIGN1; |
1721 | extern const char bb_msg_perm_denied_are_you_root[]; | 1723 | extern const char bb_msg_perm_denied_are_you_root[] ALIGN1; |
1722 | extern const char bb_msg_you_must_be_root[]; | 1724 | extern const char bb_msg_you_must_be_root[] ALIGN1; |
1723 | extern const char bb_msg_requires_arg[]; | 1725 | extern const char bb_msg_requires_arg[] ALIGN1; |
1724 | extern const char bb_msg_invalid_arg[]; | 1726 | extern const char bb_msg_invalid_arg[] ALIGN1; |
1725 | extern const char bb_msg_standard_input[]; | 1727 | extern const char bb_msg_standard_input[] ALIGN1; |
1726 | extern const char bb_msg_standard_output[]; | 1728 | extern const char bb_msg_standard_output[] ALIGN1; |
1727 | 1729 | ||
1728 | /* NB: (bb_hexdigits_upcase[i] | 0x20) -> lowercase hex digit */ | 1730 | /* NB: (bb_hexdigits_upcase[i] | 0x20) -> lowercase hex digit */ |
1729 | extern const char bb_hexdigits_upcase[]; | 1731 | extern const char bb_hexdigits_upcase[] ALIGN1; |
1730 | 1732 | ||
1731 | extern const char bb_path_wtmp_file[]; | 1733 | extern const char bb_path_wtmp_file[] ALIGN1; |
1732 | #if ENABLE_PLATFORM_MINGW32 | ||
1733 | #define bb_busybox_exec_path get_busybox_exec_path() | ||
1734 | #else | ||
1735 | extern const char bb_busybox_exec_path[]; | ||
1736 | #endif | ||
1737 | 1734 | ||
1738 | /* Busybox mount uses either /proc/mounts or /etc/mtab to | 1735 | /* Busybox mount uses either /proc/mounts or /etc/mtab to |
1739 | * get the list of currently mounted filesystems */ | 1736 | * get the list of currently mounted filesystems */ |
@@ -1747,9 +1744,14 @@ extern const char bb_busybox_exec_path[]; | |||
1747 | #define bb_path_motd_file "/etc/motd" | 1744 | #define bb_path_motd_file "/etc/motd" |
1748 | 1745 | ||
1749 | #define bb_dev_null "/dev/null" | 1746 | #define bb_dev_null "/dev/null" |
1747 | #if ENABLE_PLATFORM_MINGW32 | ||
1748 | #define bb_busybox_exec_path get_busybox_exec_path() | ||
1749 | #else | ||
1750 | extern const char bb_busybox_exec_path[] ALIGN1; | ||
1751 | #endif | ||
1750 | /* util-linux manpage says /sbin:/bin:/usr/sbin:/usr/bin, | 1752 | /* util-linux manpage says /sbin:/bin:/usr/sbin:/usr/bin, |
1751 | * but I want to save a few bytes here */ | 1753 | * but I want to save a few bytes here */ |
1752 | extern const char bb_PATH_root_path[]; /* "PATH=/sbin:/usr/sbin:/bin:/usr/bin" */ | 1754 | extern const char bb_PATH_root_path[] ALIGN1; /* "PATH=/sbin:/usr/sbin:/bin:/usr/bin" */ |
1753 | #define bb_default_root_path (bb_PATH_root_path + sizeof("PATH")) | 1755 | #define bb_default_root_path (bb_PATH_root_path + sizeof("PATH")) |
1754 | #define bb_default_path (bb_PATH_root_path + sizeof("PATH=/sbin:/usr/sbin")) | 1756 | #define bb_default_path (bb_PATH_root_path + sizeof("PATH=/sbin:/usr/sbin")) |
1755 | 1757 | ||
@@ -1779,7 +1781,7 @@ extern struct globals *const ptr_to_globals; | |||
1779 | * If you change LIBBB_DEFAULT_LOGIN_SHELL, | 1781 | * If you change LIBBB_DEFAULT_LOGIN_SHELL, |
1780 | * don't forget to change increment constant. */ | 1782 | * don't forget to change increment constant. */ |
1781 | #define LIBBB_DEFAULT_LOGIN_SHELL "-/bin/sh" | 1783 | #define LIBBB_DEFAULT_LOGIN_SHELL "-/bin/sh" |
1782 | extern const char bb_default_login_shell[]; | 1784 | extern const char bb_default_login_shell[] ALIGN1; |
1783 | /* "/bin/sh" */ | 1785 | /* "/bin/sh" */ |
1784 | #define DEFAULT_SHELL (bb_default_login_shell+1) | 1786 | #define DEFAULT_SHELL (bb_default_login_shell+1) |
1785 | /* "sh" */ | 1787 | /* "sh" */ |