diff options
| author | Glenn L McGrath <bug1@ihug.co.nz> | 2002-11-10 22:26:19 +0000 |
|---|---|---|
| committer | Glenn L McGrath <bug1@ihug.co.nz> | 2002-11-10 22:26:19 +0000 |
| commit | f234e7c755f30cf2cf7f48762370b2bcde76f68f (patch) | |
| tree | a03a08a6925cb2db4d8eb28715a46ac8a4b70249 | |
| parent | e16860df08a8fbc6fb356a35914257b1f85da3c7 (diff) | |
| download | busybox-w32-f234e7c755f30cf2cf7f48762370b2bcde76f68f.tar.gz busybox-w32-f234e7c755f30cf2cf7f48762370b2bcde76f68f.tar.bz2 busybox-w32-f234e7c755f30cf2cf7f48762370b2bcde76f68f.zip | |
Config feature DEVPTS defined and used in telnetd, by Pavel Roskin
| -rw-r--r-- | docs/Configure.help | 8 | ||||
| -rw-r--r-- | networking/telnetd.c | 6 | ||||
| -rw-r--r-- | 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 | |||
| 54 | CONFIG_FEATURE_DEVFS | 54 | CONFIG_FEATURE_DEVFS |
| 55 | Enable if you want BusyBox to work with devfs. | 55 | Enable if you want BusyBox to work with devfs. |
| 56 | 56 | ||
| 57 | Enable devfs support | ||
| 58 | CONFIG_FEATURE_DEVPTS | ||
| 59 | Enable if you want BusyBox to use Unix98 PTY support. If enabled, | ||
| 60 | busybox will use /dev/ptmx for the master side of the pseudoterminal | ||
| 61 | and /dev/pts/<number> for the slave side. Otherwise, BSD style | ||
| 62 | /dev/ttyp<number> will be used. To use this option, you should have | ||
| 63 | devpts or devfs mounted. | ||
| 64 | |||
| 57 | Clean up all memory before exiting | 65 | Clean up all memory before exiting |
| 58 | CONFIG_FEATURE_CLEAN_UP | 66 | CONFIG_FEATURE_CLEAN_UP |
| 59 | As a size optimization, busybox by default does not cleanup memory | 67 | 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 @@ | |||
| 1 | /* $Id: telnetd.c,v 1.1 2002/09/30 20:52:04 andersen Exp $ | 1 | /* $Id: telnetd.c,v 1.2 2002/11/10 22:26:19 bug1 Exp $ |
| 2 | * | 2 | * |
| 3 | * Simple telnet server | 3 | * Simple telnet server |
| 4 | * Bjorn Wesen, Axis Communications AB (bjornw@axis.com) | 4 | * Bjorn Wesen, Axis Communications AB (bjornw@axis.com) |
| @@ -156,7 +156,7 @@ static int | |||
| 156 | getpty(char *line) | 156 | getpty(char *line) |
| 157 | { | 157 | { |
| 158 | int p; | 158 | int p; |
| 159 | #ifdef HAVE_DEVPTS_FS | 159 | #ifdef CONFIG_FEATURE_DEVPTS |
| 160 | p = open("/dev/ptmx", 2); | 160 | p = open("/dev/ptmx", 2); |
| 161 | if (p > 0) { | 161 | if (p > 0) { |
| 162 | grantpt(p); | 162 | grantpt(p); |
| @@ -185,7 +185,7 @@ getpty(char *line) | |||
| 185 | } | 185 | } |
| 186 | } | 186 | } |
| 187 | } | 187 | } |
| 188 | #endif /* HAVE_DEVPTS_FS */ | 188 | #endif /* CONFIG_FEATURE_DEVPTS */ |
| 189 | return -1; | 189 | return -1; |
| 190 | } | 190 | } |
| 191 | 191 | ||
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 | |||
| 14 | bool 'Support --install [-s] to install applet links at runtime' CONFIG_FEATURE_INSTALLER | 14 | bool 'Support --install [-s] to install applet links at runtime' CONFIG_FEATURE_INSTALLER |
| 15 | bool 'Enable locale support (system needs locale for this to work)' CONFIG_LOCALE_SUPPORT | 15 | bool 'Enable locale support (system needs locale for this to work)' CONFIG_LOCALE_SUPPORT |
| 16 | bool 'Support for devfs' CONFIG_FEATURE_DEVFS | 16 | bool 'Support for devfs' CONFIG_FEATURE_DEVFS |
| 17 | if [ "$CONFIG_FEATURE_DEVFS" = "y" ]; then | ||
| 18 | define_bool CONFIG_FEATURE_DEVPTS y | ||
| 19 | else | ||
| 20 | bool ' Support for Unix98 PTY filesystem' CONFIG_FEATURE_DEVPTS | ||
| 21 | fi | ||
| 17 | bool 'Clean up all memory before exiting (usually not needed)' CONFIG_FEATURE_CLEAN_UP | 22 | bool 'Clean up all memory before exiting (usually not needed)' CONFIG_FEATURE_CLEAN_UP |
| 18 | bool 'Support for SUID/SGID handling' CONFIG_FEATURE_SUID | 23 | bool 'Support for SUID/SGID handling' CONFIG_FEATURE_SUID |
| 19 | if [ "$CONFIG_FEATURE_SUID" = "y" ]; then | 24 | if [ "$CONFIG_FEATURE_SUID" = "y" ]; then |
