aboutsummaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorvda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2007-03-25 23:21:05 +0000
committervda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2007-03-25 23:21:05 +0000
commit377526f2266c1473e0c699408c59a269c839263a (patch)
tree71e46e02914c97077eaa77e12a726b29240b27f6 /libbb
parent3c705200344cd09aa84e28e3c13e3595b3e764fb (diff)
downloadbusybox-w32-377526f2266c1473e0c699408c59a269c839263a.tar.gz
busybox-w32-377526f2266c1473e0c699408c59a269c839263a.tar.bz2
busybox-w32-377526f2266c1473e0c699408c59a269c839263a.zip
add NOMMU fixme's; move move_fd from runit_lib to libbb; nuke fd_copy
git-svn-id: svn://busybox.net/trunk/busybox@18237 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'libbb')
-rw-r--r--libbb/xfuncs.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/libbb/xfuncs.c b/libbb/xfuncs.c
index c496f9a22..1dcdbc065 100644
--- a/libbb/xfuncs.c
+++ b/libbb/xfuncs.c
@@ -133,6 +133,16 @@ int ndelay_off(int fd)
133 return fcntl(fd,F_SETFL,fcntl(fd,F_GETFL,0) & ~O_NONBLOCK); 133 return fcntl(fd,F_SETFL,fcntl(fd,F_GETFL,0) & ~O_NONBLOCK);
134} 134}
135 135
136// "Renumber" opened fd
137void xmove_fd(int from, int to)
138{
139 if (from == to)
140 return;
141 if (dup2(from, to) != to)
142 bb_perror_msg_and_die("cannot duplicate file descriptor");
143 close(from);
144}
145
136// Die with an error message if we can't write the entire buffer. 146// Die with an error message if we can't write the entire buffer.
137void xwrite(int fd, const void *buf, size_t count) 147void xwrite(int fd, const void *buf, size_t count)
138{ 148{