summaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorDenis Vlasenko2006-11-22 15:54:52 +0000
committerDenis Vlasenko2006-11-22 15:54:52 +0000
commit75f8d080a28f2a9076a5f60afeba41ac876a78a4 (patch)
tree21794599ef01c7603faff7efb1fcaf56868684c9 /libbb
parentd6bbf99a8b174d8535c195c71d3560a0d83d95fc (diff)
downloadbusybox-75f8d080a28f2a9076a5f60afeba41ac876a78a4.zip
busybox-75f8d080a28f2a9076a5f60afeba41ac876a78a4.tar.gz
telnetd: we were having telnetd with is ONLY inetd or ONLY standalone.
What if I need to have both?? This patch introduces CONFIG_FEATURE_TELNETD_STANDALONE: y - both, n - only inetd.
Diffstat (limited to 'libbb')
-rw-r--r--libbb/xfuncs.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/libbb/xfuncs.c b/libbb/xfuncs.c
index 44a5516..e6f4e3a 100644
--- a/libbb/xfuncs.c
+++ b/libbb/xfuncs.c
@@ -110,6 +110,18 @@ int xopen3(const char *pathname, int flags, int mode)
return ret;
}
+/*
+int ndelay_off(int fd)
+{
+ return fcntl(fd,F_SETFL,fcntl(fd,F_GETFL,0) & ~O_NONBLOCK);
+}
+*/
+// Turn on nonblocking I/O on a fd
+int ndelay_on(int fd)
+{
+ return fcntl(fd,F_SETFL,fcntl(fd,F_GETFL,0) | O_NONBLOCK);
+}
+
// Die with an error message if we can't write the entire buffer.
void xwrite(int fd, void *buf, size_t count)
{