missing piece of prev commit: ndelay_off

This commit is contained in:
Denis Vlasenko
2006-12-24 07:15:50 +00:00
parent f4dff77355
commit a5b3e76c38
3 changed files with 6 additions and 12 deletions

View File

@ -121,18 +121,17 @@ 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);
}
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.
void xwrite(int fd, const void *buf, size_t count)
{