aboutsummaryrefslogtreecommitdiff
path: root/include/libbb.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/libbb.h')
-rw-r--r--include/libbb.h32
1 files changed, 8 insertions, 24 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 */
336extern void complain_copyfd_and_die(off_t sz) NORETURN FAST_FUNC; 336extern void complain_copyfd_and_die(off_t sz) NORETURN FAST_FUNC;
337extern char bb_process_escape_sequence(const char **ptr) FAST_FUNC; 337extern char bb_process_escape_sequence(const char **ptr) FAST_FUNC;
338char* 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;
759char *utoa_to_buf(unsigned n, char *buf, unsigned buflen) FAST_FUNC; 760char *utoa_to_buf(unsigned n, char *buf, unsigned buflen) FAST_FUNC;
760char *itoa_to_buf(int n, char *buf, unsigned buflen) FAST_FUNC; 761char *itoa_to_buf(int n, char *buf, unsigned buflen) FAST_FUNC;
761/* Intelligent formatters of bignums */ 762/* Intelligent formatters of bignums */
762void smart_ulltoa4(unsigned long long ul, char buf[5], const char *scale) FAST_FUNC; 763void smart_ulltoa4(unsigned long long ul, char buf[4], const char *scale) FAST_FUNC;
763void smart_ulltoa5(unsigned long long ul, char buf[5], const char *scale) FAST_FUNC; 764void 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;
1559void sha512_hash(sha512_ctx_t *ctx, const void *buffer, size_t len) FAST_FUNC; 1560void sha512_hash(sha512_ctx_t *ctx, const void *buffer, size_t len) FAST_FUNC;
1560void sha512_end(sha512_ctx_t *ctx, void *resbuf) FAST_FUNC; 1561void sha512_end(sha512_ctx_t *ctx, void *resbuf) FAST_FUNC;
1561 1562
1562 1563extern uint32_t *global_crc32_table;
1563uint32_t *crc32_filltable(uint32_t *tbl256, int endian) FAST_FUNC; 1564uint32_t *crc32_filltable(uint32_t *tbl256, int endian) FAST_FUNC;
1565uint32_t crc32_block_endian1(uint32_t val, const void *buf, unsigned len, uint32_t *crc_table) FAST_FUNC;
1566uint32_t crc32_block_endian0(uint32_t val, const void *buf, unsigned len, uint32_t *crc_table) FAST_FUNC;
1564 1567
1565typedef struct masks_labels_t { 1568typedef 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)