diff options
author | Jeremie Koenig <jk@jk.fr.eu.org> | 2010-05-27 15:46:29 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-07-19 00:46:23 +0200 |
commit | 816ed971e4ce60564f7ecbdc016d268d8e936230 (patch) | |
tree | 56ae80f2bac398d6cb0d01e19b0b9ee27fe070db | |
parent | 1c05303fdc302725093294eb0305adc003d52bcb (diff) | |
download | busybox-w32-816ed971e4ce60564f7ecbdc016d268d8e936230.tar.gz busybox-w32-816ed971e4ce60564f7ecbdc016d268d8e936230.tar.bz2 busybox-w32-816ed971e4ce60564f7ecbdc016d268d8e936230.zip |
libbb.h: add device names for Hurd and FreeBSD
Adapted from include.libbb.diff from the Debian kFreeBSD people:
http://svn.debian.org/viewsvn/d-i/people/slackydeb/kfreebsd/busybox/1.14/debian
Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | include/libbb.h | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/include/libbb.h b/include/libbb.h index e2a8322b8..c043506b9 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -1613,7 +1613,27 @@ extern const char bb_default_login_shell[]; | |||
1613 | /* "sh" */ | 1613 | /* "sh" */ |
1614 | #define DEFAULT_SHELL_SHORT_NAME (bb_default_login_shell+6) | 1614 | #define DEFAULT_SHELL_SHORT_NAME (bb_default_login_shell+6) |
1615 | 1615 | ||
1616 | #if ENABLE_FEATURE_DEVFS | 1616 | /* The following devices are the same on all systems. */ |
1617 | #define CURRENT_TTY "/dev/tty" | ||
1618 | #define DEV_CONSOLE "/dev/console" | ||
1619 | |||
1620 | #if defined(__FreeBSD_kernel__) | ||
1621 | # define CURRENT_VC CURRENT_TTY | ||
1622 | # define VC_1 "/dev/ttyv0" | ||
1623 | # define VC_2 "/dev/ttyv1" | ||
1624 | # define VC_3 "/dev/ttyv2" | ||
1625 | # define VC_4 "/dev/ttyv3" | ||
1626 | # define VC_5 "/dev/ttyv4" | ||
1627 | # define VC_FORMAT "/dev/ttyv%d" | ||
1628 | #elif defined(__GNU__) | ||
1629 | # define CURRENT_VC CURRENT_TTY | ||
1630 | # define VC_1 "/dev/tty1" | ||
1631 | # define VC_2 "/dev/tty2" | ||
1632 | # define VC_3 "/dev/tty3" | ||
1633 | # define VC_4 "/dev/tty4" | ||
1634 | # define VC_5 "/dev/tty5" | ||
1635 | # define VC_FORMAT "/dev/tty%d" | ||
1636 | #elif ENABLE_FEATURE_DEVFS /* from now on, assume Linux naming */ | ||
1617 | # define CURRENT_VC "/dev/vc/0" | 1637 | # define CURRENT_VC "/dev/vc/0" |
1618 | # define VC_1 "/dev/vc/1" | 1638 | # define VC_1 "/dev/vc/1" |
1619 | # define VC_2 "/dev/vc/2" | 1639 | # define VC_2 "/dev/vc/2" |
@@ -1660,10 +1680,6 @@ extern const char bb_default_login_shell[]; | |||
1660 | # define FB_0 "/dev/fb0" | 1680 | # define FB_0 "/dev/fb0" |
1661 | #endif | 1681 | #endif |
1662 | 1682 | ||
1663 | /* The following devices are the same on devfs and non-devfs systems. */ | ||
1664 | #define CURRENT_TTY "/dev/tty" | ||
1665 | #define DEV_CONSOLE "/dev/console" | ||
1666 | |||
1667 | 1683 | ||
1668 | #define ARRAY_SIZE(x) ((unsigned)(sizeof(x) / sizeof((x)[0]))) | 1684 | #define ARRAY_SIZE(x) ((unsigned)(sizeof(x) / sizeof((x)[0]))) |
1669 | 1685 | ||