summaryrefslogtreecommitdiff
path: root/source3/torture/nbio.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2011-04-02 11:46:30 +0200
committerJeremy Allison <jra@samba.org>2011-04-26 12:22:55 -0700
commit0226428eb9d7c6d3a4984d571622f21e9c82e408 (patch)
treef45e1a38b93b580d554ef8b7ad1f47c1cdb48e44 /source3/torture/nbio.c
parentd018fccb705e91f33f3211cdc5b8a4006d032f65 (diff)
downloadsamba-0226428eb9d7c6d3a4984d571622f21e9c82e408.tar.gz
samba-0226428eb9d7c6d3a4984d571622f21e9c82e408.tar.bz2
samba-0226428eb9d7c6d3a4984d571622f21e9c82e408.zip
s3: Use cli_writeall instead of cli_write
Signed-off-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/torture/nbio.c')
-rw-r--r--source3/torture/nbio.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source3/torture/nbio.c b/source3/torture/nbio.c
index 664943b681..49ac4b5cec 100644
--- a/source3/torture/nbio.c
+++ b/source3/torture/nbio.c
@@ -189,13 +189,17 @@ void nb_createx(const char *fname,
void nb_writex(int handle, int offset, int size, int ret_size)
{
int i;
+ NTSTATUS status;
if (buf[0] == 0) memset(buf, 1, sizeof(buf));
i = find_handle(handle);
- if (cli_write(c, ftable[i].fd, 0, buf, offset, size) != ret_size) {
- printf("(%d) ERROR: write failed on handle %d, fd %d \
-errno %d (%s)\n", line_count, handle, ftable[i].fd, errno, strerror(errno));
+ status = cli_writeall(c, ftable[i].fd, 0, (uint8_t *)buf, offset, size,
+ NULL);
+ if (!NT_STATUS_IS_OK(status)) {
+ printf("(%d) ERROR: write failed on handle %d, fd %d "
+ "error %s\n", line_count, handle, ftable[i].fd,
+ nt_errstr(status));
exit(1);
}