diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2006-12-24 07:15:50 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2006-12-24 07:15:50 +0000 |
commit | a5b3e76c38371c2c5781c11cfe5980aeb041e034 (patch) | |
tree | 8d71b29b19c05aa96220da4d14552d83a66f9b09 | |
parent | f4dff773553da8b4a5a66205e920a82732156851 (diff) | |
download | busybox-w32-a5b3e76c38371c2c5781c11cfe5980aeb041e034.tar.gz busybox-w32-a5b3e76c38371c2c5781c11cfe5980aeb041e034.tar.bz2 busybox-w32-a5b3e76c38371c2c5781c11cfe5980aeb041e034.zip |
missing piece of prev commit: ndelay_off
-rw-r--r-- | include/libbb.h | 1 | ||||
-rw-r--r-- | libbb/xfuncs.c | 11 | ||||
-rw-r--r-- | runit/runit_lib.h | 6 |
3 files changed, 6 insertions, 12 deletions
diff --git a/include/libbb.h b/include/libbb.h index 2bfeba4e1..d94dd598e 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -213,6 +213,7 @@ extern void complain_copyfd_and_die(off_t sz) ATTRIBUTE_NORETURN; | |||
213 | extern char bb_process_escape_sequence(const char **ptr); | 213 | extern char bb_process_escape_sequence(const char **ptr); |
214 | extern char *bb_get_last_path_component(char *path); | 214 | extern char *bb_get_last_path_component(char *path); |
215 | extern int ndelay_on(int fd); | 215 | extern int ndelay_on(int fd); |
216 | extern int ndelay_off(int fd); | ||
216 | 217 | ||
217 | 218 | ||
218 | extern DIR *xopendir(const char *path); | 219 | extern DIR *xopendir(const char *path); |
diff --git a/libbb/xfuncs.c b/libbb/xfuncs.c index 136dd1cca..827cbe870 100644 --- a/libbb/xfuncs.c +++ b/libbb/xfuncs.c | |||
@@ -121,18 +121,17 @@ int xopen3(const char *pathname, int flags, int mode) | |||
121 | return ret; | 121 | return ret; |
122 | } | 122 | } |
123 | 123 | ||
124 | /* | ||
125 | int ndelay_off(int fd) | ||
126 | { | ||
127 | return fcntl(fd,F_SETFL,fcntl(fd,F_GETFL,0) & ~O_NONBLOCK); | ||
128 | } | ||
129 | */ | ||
130 | // Turn on nonblocking I/O on a fd | 124 | // Turn on nonblocking I/O on a fd |
131 | int ndelay_on(int fd) | 125 | int ndelay_on(int fd) |
132 | { | 126 | { |
133 | return fcntl(fd,F_SETFL,fcntl(fd,F_GETFL,0) | O_NONBLOCK); | 127 | return fcntl(fd,F_SETFL,fcntl(fd,F_GETFL,0) | O_NONBLOCK); |
134 | } | 128 | } |
135 | 129 | ||
130 | int ndelay_off(int fd) | ||
131 | { | ||
132 | return fcntl(fd,F_SETFL,fcntl(fd,F_GETFL,0) & ~O_NONBLOCK); | ||
133 | } | ||
134 | |||
136 | // Die with an error message if we can't write the entire buffer. | 135 | // Die with an error message if we can't write the entire buffer. |
137 | void xwrite(int fd, const void *buf, size_t count) | 136 | void xwrite(int fd, const void *buf, size_t count) |
138 | { | 137 | { |
diff --git a/runit/runit_lib.h b/runit/runit_lib.h index 1f911919d..f4beb560e 100644 --- a/runit/runit_lib.h +++ b/runit/runit_lib.h | |||
@@ -274,12 +274,6 @@ extern int lock_un(int); | |||
274 | extern int lock_exnb(int); | 274 | extern int lock_exnb(int); |
275 | 275 | ||
276 | 276 | ||
277 | /*** ndelay.h ***/ | ||
278 | |||
279 | extern int ndelay_on(int); | ||
280 | extern int ndelay_off(int); | ||
281 | |||
282 | |||
283 | /*** open.h ***/ | 277 | /*** open.h ***/ |
284 | 278 | ||
285 | extern int open_read(const char *); | 279 | extern int open_read(const char *); |