mirror of
https://github.com/sheumann/hush.git
synced 2024-12-22 14:30:31 +00:00
missing piece of prev commit: ndelay_off
This commit is contained in:
parent
f4dff77355
commit
a5b3e76c38
@ -213,6 +213,7 @@ extern void complain_copyfd_and_die(off_t sz) ATTRIBUTE_NORETURN;
|
|||||||
extern char bb_process_escape_sequence(const char **ptr);
|
extern char bb_process_escape_sequence(const char **ptr);
|
||||||
extern char *bb_get_last_path_component(char *path);
|
extern char *bb_get_last_path_component(char *path);
|
||||||
extern int ndelay_on(int fd);
|
extern int ndelay_on(int fd);
|
||||||
|
extern int ndelay_off(int fd);
|
||||||
|
|
||||||
|
|
||||||
extern DIR *xopendir(const char *path);
|
extern DIR *xopendir(const char *path);
|
||||||
|
@ -121,18 +121,17 @@ int xopen3(const char *pathname, int flags, int mode)
|
|||||||
return ret;
|
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
|
// Turn on nonblocking I/O on a fd
|
||||||
int ndelay_on(int fd)
|
int ndelay_on(int fd)
|
||||||
{
|
{
|
||||||
return fcntl(fd,F_SETFL,fcntl(fd,F_GETFL,0) | O_NONBLOCK);
|
return fcntl(fd,F_SETFL,fcntl(fd,F_GETFL,0) | O_NONBLOCK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int ndelay_off(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.
|
// Die with an error message if we can't write the entire buffer.
|
||||||
void xwrite(int fd, const void *buf, size_t count)
|
void xwrite(int fd, const void *buf, size_t count)
|
||||||
{
|
{
|
||||||
|
@ -274,12 +274,6 @@ extern int lock_un(int);
|
|||||||
extern int lock_exnb(int);
|
extern int lock_exnb(int);
|
||||||
|
|
||||||
|
|
||||||
/*** ndelay.h ***/
|
|
||||||
|
|
||||||
extern int ndelay_on(int);
|
|
||||||
extern int ndelay_off(int);
|
|
||||||
|
|
||||||
|
|
||||||
/*** open.h ***/
|
/*** open.h ***/
|
||||||
|
|
||||||
extern int open_read(const char *);
|
extern int open_read(const char *);
|
||||||
|
Loading…
Reference in New Issue
Block a user