aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/applets.src.h1
-rw-r--r--include/libbb.h26
-rw-r--r--include/usage.src.h33
3 files changed, 21 insertions, 39 deletions
diff --git a/include/applets.src.h b/include/applets.src.h
index 6ca0c3230..195598fee 100644
--- a/include/applets.src.h
+++ b/include/applets.src.h
@@ -104,7 +104,6 @@ IF_CPIO(APPLET(cpio, _BB_DIR_BIN, _BB_SUID_DROP))
104IF_CROND(APPLET(crond, _BB_DIR_USR_SBIN, _BB_SUID_DROP)) 104IF_CROND(APPLET(crond, _BB_DIR_USR_SBIN, _BB_SUID_DROP))
105IF_CRONTAB(APPLET(crontab, _BB_DIR_USR_BIN, _BB_SUID_REQUIRE)) 105IF_CRONTAB(APPLET(crontab, _BB_DIR_USR_BIN, _BB_SUID_REQUIRE))
106IF_CRYPTPW(APPLET(cryptpw, _BB_DIR_USR_BIN, _BB_SUID_DROP)) 106IF_CRYPTPW(APPLET(cryptpw, _BB_DIR_USR_BIN, _BB_SUID_DROP))
107IF_CTTYHACK(APPLET(cttyhack, _BB_DIR_BIN, _BB_SUID_DROP))
108IF_CUT(APPLET_NOEXEC(cut, cut, _BB_DIR_USR_BIN, _BB_SUID_DROP, cut)) 107IF_CUT(APPLET_NOEXEC(cut, cut, _BB_DIR_USR_BIN, _BB_SUID_DROP, cut))
109IF_DATE(APPLET(date, _BB_DIR_BIN, _BB_SUID_DROP)) 108IF_DATE(APPLET(date, _BB_DIR_BIN, _BB_SUID_DROP))
110IF_DC(APPLET(dc, _BB_DIR_USR_BIN, _BB_SUID_DROP)) 109IF_DC(APPLET(dc, _BB_DIR_USR_BIN, _BB_SUID_DROP))
diff --git a/include/libbb.h b/include/libbb.h
index 26656de2e..a98affb3a 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -1633,7 +1633,27 @@ extern const char bb_default_login_shell[];
1633/* "sh" */ 1633/* "sh" */
1634#define DEFAULT_SHELL_SHORT_NAME (bb_default_login_shell+6) 1634#define DEFAULT_SHELL_SHORT_NAME (bb_default_login_shell+6)
1635 1635
1636#if ENABLE_FEATURE_DEVFS 1636/* The following devices are the same on all systems. */
1637#define CURRENT_TTY "/dev/tty"
1638#define DEV_CONSOLE "/dev/console"
1639
1640#if defined(__FreeBSD_kernel__)
1641# define CURRENT_VC CURRENT_TTY
1642# define VC_1 "/dev/ttyv0"
1643# define VC_2 "/dev/ttyv1"
1644# define VC_3 "/dev/ttyv2"
1645# define VC_4 "/dev/ttyv3"
1646# define VC_5 "/dev/ttyv4"
1647# define VC_FORMAT "/dev/ttyv%d"
1648#elif defined(__GNU__)
1649# define CURRENT_VC CURRENT_TTY
1650# define VC_1 "/dev/tty1"
1651# define VC_2 "/dev/tty2"
1652# define VC_3 "/dev/tty3"
1653# define VC_4 "/dev/tty4"
1654# define VC_5 "/dev/tty5"
1655# define VC_FORMAT "/dev/tty%d"
1656#elif ENABLE_FEATURE_DEVFS /* from now on, assume Linux naming */
1637# define CURRENT_VC "/dev/vc/0" 1657# define CURRENT_VC "/dev/vc/0"
1638# define VC_1 "/dev/vc/1" 1658# define VC_1 "/dev/vc/1"
1639# define VC_2 "/dev/vc/2" 1659# define VC_2 "/dev/vc/2"
@@ -1680,10 +1700,6 @@ extern const char bb_default_login_shell[];
1680# define FB_0 "/dev/fb0" 1700# define FB_0 "/dev/fb0"
1681#endif 1701#endif
1682 1702
1683/* The following devices are the same on devfs and non-devfs systems. */
1684#define CURRENT_TTY "/dev/tty"
1685#define DEV_CONSOLE "/dev/console"
1686
1687 1703
1688#define ARRAY_SIZE(x) ((unsigned)(sizeof(x) / sizeof((x)[0]))) 1704#define ARRAY_SIZE(x) ((unsigned)(sizeof(x) / sizeof((x)[0])))
1689 1705
diff --git a/include/usage.src.h b/include/usage.src.h
index 46d64c135..0053a7c4b 100644
--- a/include/usage.src.h
+++ b/include/usage.src.h
@@ -678,17 +678,6 @@ INSERT
678 "\n -S SALT" \ 678 "\n -S SALT" \
679 ) \ 679 ) \
680 680
681#define cttyhack_trivial_usage \
682 "PROG ARGS"
683#define cttyhack_full_usage "\n\n" \
684 "Give PROG a controlling tty if possible." \
685 "\nExample for /etc/inittab (for busybox init):" \
686 "\n ::respawn:/bin/cttyhack /bin/sh" \
687 "\nGiving controlling tty to shell running with PID 1:" \
688 "\n $ exec cttyhack sh" \
689 "\nStarting interactive shell from boot shell script:" \
690 "\n setsid cttyhack sh" \
691
692#define cut_trivial_usage \ 681#define cut_trivial_usage \
693 "[OPTIONS] [FILE]..." 682 "[OPTIONS] [FILE]..."
694#define cut_full_usage "\n\n" \ 683#define cut_full_usage "\n\n" \
@@ -747,28 +736,6 @@ INSERT
747 "$ date\n" \ 736 "$ date\n" \
748 "Wed Apr 12 18:52:41 MDT 2000\n" 737 "Wed Apr 12 18:52:41 MDT 2000\n"
749 738
750#define dc_trivial_usage \
751 "expression..."
752#define dc_full_usage "\n\n" \
753 "Tiny RPN calculator. Operations:\n" \
754 "+, add, -, sub, *, mul, /, div, %, mod, **, exp, and, or, not, eor,\n" \
755 "p - print top of the stack (without altering the stack),\n" \
756 "f - print entire stack, o - pop the value and set output radix\n" \
757 "(value must be 10 or 16).\n" \
758 "Examples: 'dc 2 2 add' -> 4, 'dc 8 8 * 2 2 + /' -> 16\n" \
759
760#define dc_example_usage \
761 "$ dc 2 2 + p\n" \
762 "4\n" \
763 "$ dc 8 8 \\* 2 2 + / p\n" \
764 "16\n" \
765 "$ dc 0 1 and p\n" \
766 "0\n" \
767 "$ dc 0 1 or p\n" \
768 "1\n" \
769 "$ echo 72 9 div 8 mul p | dc\n" \
770 "64\n"
771
772#define dd_trivial_usage \ 739#define dd_trivial_usage \
773 "[if=FILE] [of=FILE] " IF_FEATURE_DD_IBS_OBS("[ibs=N] [obs=N] ") "[bs=N] [count=N] [skip=N]\n" \ 740 "[if=FILE] [of=FILE] " IF_FEATURE_DD_IBS_OBS("[ibs=N] [obs=N] ") "[bs=N] [count=N] [skip=N]\n" \
774 " [seek=N]" IF_FEATURE_DD_IBS_OBS(" [conv=notrunc|noerror|sync|fsync]") 741 " [seek=N]" IF_FEATURE_DD_IBS_OBS(" [conv=notrunc|noerror|sync|fsync]")