diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/libbb.h | 32 | ||||
-rw-r--r-- | include/platform.h | 9 | ||||
-rw-r--r-- | include/usage.src.h | 33 |
3 files changed, 8 insertions, 66 deletions
diff --git a/include/libbb.h b/include/libbb.h index 325aae2a3..2936a8816 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -335,6 +335,7 @@ extern void bb_copyfd_exact_size(int fd1, int fd2, off_t size) FAST_FUNC; | |||
335 | /* this helper yells "short read!" if param is not -1 */ | 335 | /* this helper yells "short read!" if param is not -1 */ |
336 | extern void complain_copyfd_and_die(off_t sz) NORETURN FAST_FUNC; | 336 | extern void complain_copyfd_and_die(off_t sz) NORETURN FAST_FUNC; |
337 | extern char bb_process_escape_sequence(const char **ptr) FAST_FUNC; | 337 | extern char bb_process_escape_sequence(const char **ptr) FAST_FUNC; |
338 | char* strcpy_and_process_escape_sequences(char *dst, const char *src) FAST_FUNC; | ||
338 | /* xxxx_strip version can modify its parameter: | 339 | /* xxxx_strip version can modify its parameter: |
339 | * "/" -> "/" | 340 | * "/" -> "/" |
340 | * "abc" -> "abc" | 341 | * "abc" -> "abc" |
@@ -759,7 +760,7 @@ char *itoa(int n) FAST_FUNC; | |||
759 | char *utoa_to_buf(unsigned n, char *buf, unsigned buflen) FAST_FUNC; | 760 | char *utoa_to_buf(unsigned n, char *buf, unsigned buflen) FAST_FUNC; |
760 | char *itoa_to_buf(int n, char *buf, unsigned buflen) FAST_FUNC; | 761 | char *itoa_to_buf(int n, char *buf, unsigned buflen) FAST_FUNC; |
761 | /* Intelligent formatters of bignums */ | 762 | /* Intelligent formatters of bignums */ |
762 | void smart_ulltoa4(unsigned long long ul, char buf[5], const char *scale) FAST_FUNC; | 763 | void smart_ulltoa4(unsigned long long ul, char buf[4], const char *scale) FAST_FUNC; |
763 | void smart_ulltoa5(unsigned long long ul, char buf[5], const char *scale) FAST_FUNC; | 764 | void smart_ulltoa5(unsigned long long ul, char buf[5], const char *scale) FAST_FUNC; |
764 | /* If block_size == 0, display size without fractional part, | 765 | /* If block_size == 0, display size without fractional part, |
765 | * else display (size * block_size) with one decimal digit. | 766 | * else display (size * block_size) with one decimal digit. |
@@ -1559,8 +1560,10 @@ void sha512_begin(sha512_ctx_t *ctx) FAST_FUNC; | |||
1559 | void sha512_hash(sha512_ctx_t *ctx, const void *buffer, size_t len) FAST_FUNC; | 1560 | void sha512_hash(sha512_ctx_t *ctx, const void *buffer, size_t len) FAST_FUNC; |
1560 | void sha512_end(sha512_ctx_t *ctx, void *resbuf) FAST_FUNC; | 1561 | void sha512_end(sha512_ctx_t *ctx, void *resbuf) FAST_FUNC; |
1561 | 1562 | ||
1562 | 1563 | extern uint32_t *global_crc32_table; | |
1563 | uint32_t *crc32_filltable(uint32_t *tbl256, int endian) FAST_FUNC; | 1564 | uint32_t *crc32_filltable(uint32_t *tbl256, int endian) FAST_FUNC; |
1565 | uint32_t crc32_block_endian1(uint32_t val, const void *buf, unsigned len, uint32_t *crc_table) FAST_FUNC; | ||
1566 | uint32_t crc32_block_endian0(uint32_t val, const void *buf, unsigned len, uint32_t *crc_table) FAST_FUNC; | ||
1564 | 1567 | ||
1565 | typedef struct masks_labels_t { | 1568 | typedef struct masks_labels_t { |
1566 | const char *labels; | 1569 | const char *labels; |
@@ -1688,46 +1691,27 @@ extern const char bb_default_login_shell[]; | |||
1688 | # define VC_4 "/dev/tty4" | 1691 | # define VC_4 "/dev/tty4" |
1689 | # define VC_5 "/dev/tty5" | 1692 | # define VC_5 "/dev/tty5" |
1690 | # define VC_FORMAT "/dev/tty%d" | 1693 | # define VC_FORMAT "/dev/tty%d" |
1691 | #elif ENABLE_FEATURE_DEVFS /* from now on, assume Linux naming */ | 1694 | #elif ENABLE_FEATURE_DEVFS |
1695 | /*Linux, obsolete devfs names */ | ||
1692 | # define CURRENT_VC "/dev/vc/0" | 1696 | # define CURRENT_VC "/dev/vc/0" |
1693 | # define VC_1 "/dev/vc/1" | 1697 | # define VC_1 "/dev/vc/1" |
1694 | # define VC_2 "/dev/vc/2" | 1698 | # define VC_2 "/dev/vc/2" |
1695 | # define VC_3 "/dev/vc/3" | 1699 | # define VC_3 "/dev/vc/3" |
1696 | # define VC_4 "/dev/vc/4" | 1700 | # define VC_4 "/dev/vc/4" |
1697 | # define VC_5 "/dev/vc/5" | 1701 | # define VC_5 "/dev/vc/5" |
1698 | # if defined(__sh__) || defined(__H8300H__) || defined(__H8300S__) | ||
1699 | /* Yes, this sucks, but both SH (including sh64) and H8 have a SCI(F) for their | ||
1700 | respective serial ports .. as such, we can't use the common device paths for | ||
1701 | these. -- PFM */ | ||
1702 | # define SC_0 "/dev/ttsc/0" | ||
1703 | # define SC_1 "/dev/ttsc/1" | ||
1704 | # define SC_FORMAT "/dev/ttsc/%d" | ||
1705 | # else | ||
1706 | # define SC_0 "/dev/tts/0" | ||
1707 | # define SC_1 "/dev/tts/1" | ||
1708 | # define SC_FORMAT "/dev/tts/%d" | ||
1709 | # endif | ||
1710 | # define VC_FORMAT "/dev/vc/%d" | 1702 | # define VC_FORMAT "/dev/vc/%d" |
1711 | # define LOOP_FORMAT "/dev/loop/%d" | 1703 | # define LOOP_FORMAT "/dev/loop/%d" |
1712 | # define LOOP_NAMESIZE (sizeof("/dev/loop/") + sizeof(int)*3 + 1) | 1704 | # define LOOP_NAMESIZE (sizeof("/dev/loop/") + sizeof(int)*3 + 1) |
1713 | # define LOOP_NAME "/dev/loop/" | 1705 | # define LOOP_NAME "/dev/loop/" |
1714 | # define FB_0 "/dev/fb/0" | 1706 | # define FB_0 "/dev/fb/0" |
1715 | #else | 1707 | #else |
1708 | /*Linux, normal names */ | ||
1716 | # define CURRENT_VC "/dev/tty0" | 1709 | # define CURRENT_VC "/dev/tty0" |
1717 | # define VC_1 "/dev/tty1" | 1710 | # define VC_1 "/dev/tty1" |
1718 | # define VC_2 "/dev/tty2" | 1711 | # define VC_2 "/dev/tty2" |
1719 | # define VC_3 "/dev/tty3" | 1712 | # define VC_3 "/dev/tty3" |
1720 | # define VC_4 "/dev/tty4" | 1713 | # define VC_4 "/dev/tty4" |
1721 | # define VC_5 "/dev/tty5" | 1714 | # define VC_5 "/dev/tty5" |
1722 | # if defined(__sh__) || defined(__H8300H__) || defined(__H8300S__) | ||
1723 | # define SC_0 "/dev/ttySC0" | ||
1724 | # define SC_1 "/dev/ttySC1" | ||
1725 | # define SC_FORMAT "/dev/ttySC%d" | ||
1726 | # else | ||
1727 | # define SC_0 "/dev/ttyS0" | ||
1728 | # define SC_1 "/dev/ttyS1" | ||
1729 | # define SC_FORMAT "/dev/ttyS%d" | ||
1730 | # endif | ||
1731 | # define VC_FORMAT "/dev/tty%d" | 1715 | # define VC_FORMAT "/dev/tty%d" |
1732 | # define LOOP_FORMAT "/dev/loop%d" | 1716 | # define LOOP_FORMAT "/dev/loop%d" |
1733 | # define LOOP_NAMESIZE (sizeof("/dev/loop") + sizeof(int)*3 + 1) | 1717 | # define LOOP_NAMESIZE (sizeof("/dev/loop") + sizeof(int)*3 + 1) |
diff --git a/include/platform.h b/include/platform.h index c20d2aef6..3400fdfd5 100644 --- a/include/platform.h +++ b/include/platform.h | |||
@@ -283,15 +283,6 @@ typedef uint32_t bb__aliased_uint32_t FIX_ALIASING; | |||
283 | 283 | ||
284 | /* ---- Miscellaneous --------------------------------------- */ | 284 | /* ---- Miscellaneous --------------------------------------- */ |
285 | 285 | ||
286 | #if defined(__GNU_LIBRARY__) && __GNU_LIBRARY__ < 5 && \ | ||
287 | !defined(__dietlibc__) && \ | ||
288 | !defined(_NEWLIB_VERSION) && \ | ||
289 | !(defined __digital__ && defined __unix__) | ||
290 | # error "Sorry, this libc version is not supported :(" | ||
291 | #endif | ||
292 | |||
293 | /* Don't perpetuate e2fsck crap into the headers. Clean up e2fsck instead. */ | ||
294 | |||
295 | #if defined __GLIBC__ || defined __UCLIBC__ \ | 286 | #if defined __GLIBC__ || defined __UCLIBC__ \ |
296 | || defined __dietlibc__ || defined _NEWLIB_VERSION | 287 | || defined __dietlibc__ || defined _NEWLIB_VERSION |
297 | # include <features.h> | 288 | # include <features.h> |
diff --git a/include/usage.src.h b/include/usage.src.h index f5ddd7ba5..6973c93ef 100644 --- a/include/usage.src.h +++ b/include/usage.src.h | |||
@@ -2695,18 +2695,6 @@ INSERT | |||
2695 | "ras3 reset retension rewind rewoffline seek setblk setdensity\n" \ | 2695 | "ras3 reset retension rewind rewoffline seek setblk setdensity\n" \ |
2696 | "setpart tell unload unlock weof wset" \ | 2696 | "setpart tell unload unlock weof wset" \ |
2697 | 2697 | ||
2698 | #define mv_trivial_usage \ | ||
2699 | "[-fi] SOURCE DEST\n" \ | ||
2700 | "or: mv [-fi] SOURCE... DIRECTORY" | ||
2701 | #define mv_full_usage "\n\n" \ | ||
2702 | "Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY\n" \ | ||
2703 | "\nOptions:" \ | ||
2704 | "\n -f Don't prompt before overwriting" \ | ||
2705 | "\n -i Interactive, prompt before overwrite" \ | ||
2706 | |||
2707 | #define mv_example_usage \ | ||
2708 | "$ mv /tmp/foo /bin/bar\n" | ||
2709 | |||
2710 | #define nameif_trivial_usage \ | 2698 | #define nameif_trivial_usage \ |
2711 | "[-s] [-c FILE] [{IFNAME MACADDR}]" | 2699 | "[-s] [-c FILE] [{IFNAME MACADDR}]" |
2712 | #define nameif_full_usage "\n\n" \ | 2700 | #define nameif_full_usage "\n\n" \ |
@@ -2721,27 +2709,6 @@ INSERT | |||
2721 | " or\n" \ | 2709 | " or\n" \ |
2722 | "$ nameif -c /etc/my_mactab_file\n" \ | 2710 | "$ nameif -c /etc/my_mactab_file\n" \ |
2723 | 2711 | ||
2724 | #define netstat_trivial_usage \ | ||
2725 | "[-laentuwxr"IF_FEATURE_NETSTAT_WIDE("W")IF_FEATURE_NETSTAT_PRG("p")"]" | ||
2726 | #define netstat_full_usage "\n\n" \ | ||
2727 | "Display networking information\n" \ | ||
2728 | "\nOptions:" \ | ||
2729 | "\n -l Display listening server sockets" \ | ||
2730 | "\n -a Display all sockets (default: connected)" \ | ||
2731 | "\n -e Display other/more information" \ | ||
2732 | "\n -n Don't resolve names" \ | ||
2733 | "\n -t Tcp sockets" \ | ||
2734 | "\n -u Udp sockets" \ | ||
2735 | "\n -w Raw sockets" \ | ||
2736 | "\n -x Unix sockets" \ | ||
2737 | "\n -r Display routing table" \ | ||
2738 | IF_FEATURE_NETSTAT_WIDE( \ | ||
2739 | "\n -W Display with no column truncation" \ | ||
2740 | ) \ | ||
2741 | IF_FEATURE_NETSTAT_PRG( \ | ||
2742 | "\n -p Display PID/Program name for sockets" \ | ||
2743 | ) | ||
2744 | |||
2745 | #define nmeter_trivial_usage \ | 2712 | #define nmeter_trivial_usage \ |
2746 | "format_string" | 2713 | "format_string" |
2747 | #define nmeter_full_usage "\n\n" \ | 2714 | #define nmeter_full_usage "\n\n" \ |