summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJeremie Koenig2010-05-27 15:46:29 +0200
committerDenys Vlasenko2010-07-19 00:46:23 +0200
commit816ed971e4ce60564f7ecbdc016d268d8e936230 (patch)
tree56ae80f2bac398d6cb0d01e19b0b9ee27fe070db /include
parent1c05303fdc302725093294eb0305adc003d52bcb (diff)
downloadbusybox-816ed971e4ce60564f7ecbdc016d268d8e936230.zip
busybox-816ed971e4ce60564f7ecbdc016d268d8e936230.tar.gz
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>
Diffstat (limited to 'include')
-rw-r--r--include/libbb.h26
1 files changed, 21 insertions, 5 deletions
diff --git a/include/libbb.h b/include/libbb.h
index e2a8322..c043506 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -1613,7 +1613,27 @@ extern const char bb_default_login_shell[];
/* "sh" */
#define DEFAULT_SHELL_SHORT_NAME (bb_default_login_shell+6)
-#if ENABLE_FEATURE_DEVFS
+/* The following devices are the same on all systems. */
+#define CURRENT_TTY "/dev/tty"
+#define DEV_CONSOLE "/dev/console"
+
+#if defined(__FreeBSD_kernel__)
+# define CURRENT_VC CURRENT_TTY
+# define VC_1 "/dev/ttyv0"
+# define VC_2 "/dev/ttyv1"
+# define VC_3 "/dev/ttyv2"
+# define VC_4 "/dev/ttyv3"
+# define VC_5 "/dev/ttyv4"
+# define VC_FORMAT "/dev/ttyv%d"
+#elif defined(__GNU__)
+# define CURRENT_VC CURRENT_TTY
+# define VC_1 "/dev/tty1"
+# define VC_2 "/dev/tty2"
+# define VC_3 "/dev/tty3"
+# define VC_4 "/dev/tty4"
+# define VC_5 "/dev/tty5"
+# define VC_FORMAT "/dev/tty%d"
+#elif ENABLE_FEATURE_DEVFS /* from now on, assume Linux naming */
# define CURRENT_VC "/dev/vc/0"
# define VC_1 "/dev/vc/1"
# define VC_2 "/dev/vc/2"
@@ -1660,10 +1680,6 @@ extern const char bb_default_login_shell[];
# define FB_0 "/dev/fb0"
#endif
-/* The following devices are the same on devfs and non-devfs systems. */
-#define CURRENT_TTY "/dev/tty"
-#define DEV_CONSOLE "/dev/console"
-
#define ARRAY_SIZE(x) ((unsigned)(sizeof(x) / sizeof((x)[0])))