mirror of
https://github.com/samba-team/samba.git
synced 2025-02-28 01:58:17 +03:00
Add sys_writev
This commit is contained in:
parent
102028ec72
commit
6251b97e02
@ -969,6 +969,7 @@ void *sys_memalign( size_t align, size_t size );
|
||||
int sys_usleep(long usecs);
|
||||
ssize_t sys_read(int fd, void *buf, size_t count);
|
||||
ssize_t sys_write(int fd, const void *buf, size_t count);
|
||||
ssize_t sys_writev(int fd, const struct iovec *iov, int iovcnt);
|
||||
ssize_t sys_pread(int fd, void *buf, size_t count, SMB_OFF_T off);
|
||||
ssize_t sys_pwrite(int fd, const void *buf, size_t count, SMB_OFF_T off);
|
||||
ssize_t sys_send(int s, const void *msg, size_t len, int flags);
|
||||
|
@ -141,6 +141,20 @@ ssize_t sys_write(int fd, const void *buf, size_t count)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
A writev wrapper that will deal with EINTR.
|
||||
********************************************************************/
|
||||
|
||||
ssize_t sys_writev(int fd, const struct iovec *iov, int iovcnt)
|
||||
{
|
||||
ssize_t ret;
|
||||
|
||||
do {
|
||||
ret = writev(fd, iov, iovcnt);
|
||||
} while (ret == -1 && errno == EINTR);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
A pread wrapper that will deal with EINTR and 64-bit file offsets.
|
||||
********************************************************************/
|
||||
|
Loading…
x
Reference in New Issue
Block a user