From f234e7c755f30cf2cf7f48762370b2bcde76f68f Mon Sep 17 00:00:00 2001 From: Glenn L McGrath Date: Sun, 10 Nov 2002 22:26:19 +0000 Subject: [PATCH] Config feature DEVPTS defined and used in telnetd, by Pavel Roskin --- docs/Configure.help | 8 ++++++++ networking/telnetd.c | 6 +++--- sysdeps/linux/config.in | 5 +++++ 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/docs/Configure.help b/docs/Configure.help index 8ba638b68..53cebd578 100644 --- a/docs/Configure.help +++ b/docs/Configure.help @@ -54,6 +54,14 @@ Enable devfs support CONFIG_FEATURE_DEVFS Enable if you want BusyBox to work with devfs. +Enable devfs support +CONFIG_FEATURE_DEVPTS + Enable if you want BusyBox to use Unix98 PTY support. If enabled, + busybox will use /dev/ptmx for the master side of the pseudoterminal + and /dev/pts/ for the slave side. Otherwise, BSD style + /dev/ttyp will be used. To use this option, you should have + devpts or devfs mounted. + Clean up all memory before exiting CONFIG_FEATURE_CLEAN_UP As a size optimization, busybox by default does not cleanup memory diff --git a/networking/telnetd.c b/networking/telnetd.c index edc018a2a..d208319a3 100644 --- a/networking/telnetd.c +++ b/networking/telnetd.c @@ -1,4 +1,4 @@ -/* $Id: telnetd.c,v 1.1 2002/09/30 20:52:04 andersen Exp $ +/* $Id: telnetd.c,v 1.2 2002/11/10 22:26:19 bug1 Exp $ * * Simple telnet server * Bjorn Wesen, Axis Communications AB (bjornw@axis.com) @@ -156,7 +156,7 @@ static int getpty(char *line) { int p; -#ifdef HAVE_DEVPTS_FS +#ifdef CONFIG_FEATURE_DEVPTS p = open("/dev/ptmx", 2); if (p > 0) { grantpt(p); @@ -185,7 +185,7 @@ getpty(char *line) } } } -#endif /* HAVE_DEVPTS_FS */ +#endif /* CONFIG_FEATURE_DEVPTS */ return -1; } diff --git a/sysdeps/linux/config.in b/sysdeps/linux/config.in index ca7d97d4b..dac74e8e0 100644 --- a/sysdeps/linux/config.in +++ b/sysdeps/linux/config.in @@ -14,6 +14,11 @@ bool 'Show verbose applet usage messages' CONFIG_FEATURE_VERBOSE_USAGE bool 'Support --install [-s] to install applet links at runtime' CONFIG_FEATURE_INSTALLER bool 'Enable locale support (system needs locale for this to work)' CONFIG_LOCALE_SUPPORT bool 'Support for devfs' CONFIG_FEATURE_DEVFS +if [ "$CONFIG_FEATURE_DEVFS" = "y" ]; then + define_bool CONFIG_FEATURE_DEVPTS y +else + bool ' Support for Unix98 PTY filesystem' CONFIG_FEATURE_DEVPTS +fi bool 'Clean up all memory before exiting (usually not needed)' CONFIG_FEATURE_CLEAN_UP bool 'Support for SUID/SGID handling' CONFIG_FEATURE_SUID if [ "$CONFIG_FEATURE_SUID" = "y" ]; then -- 2.25.1