summaryrefslogtreecommitdiff
path: root/source3/torture/test_posix_append.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-06-24 16:26:23 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-06-24 16:26:23 +1000
commit6da26870e0ae5acd6ff49a30ec2f6886b44d095e (patch)
tree850c71039563c16a5d563c47e7ba2ab645baf198 /source3/torture/test_posix_append.c
parent6925a799d04c6fa59dd2ddef1f5510f9bb7d17d1 (diff)
parent2610c05b5b95cc7036b3d6dfb894c6cfbdb68483 (diff)
downloadsamba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.tar.gz
samba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.tar.bz2
samba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.zip
Merge 2610c05b5b95cc7036b3d6dfb894c6cfbdb68483 as Samba-4.0alpha16
Diffstat (limited to 'source3/torture/test_posix_append.c')
-rw-r--r--source3/torture/test_posix_append.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source3/torture/test_posix_append.c b/source3/torture/test_posix_append.c
index 6c8317e5aa..2f562633e5 100644
--- a/source3/torture/test_posix_append.c
+++ b/source3/torture/test_posix_append.c
@@ -20,6 +20,7 @@
#include "includes.h"
#include "torture/proto.h"
#include "../libcli/security/security.h"
+#include "libsmb/libsmb.h"
/*
* Make sure that GENERIC_WRITE does not trigger append. See
@@ -32,9 +33,8 @@ bool run_posix_append(int dummy)
const char *fname = "append";
NTSTATUS status;
uint16_t fnum;
- ssize_t written;
SMB_OFF_T size;
- char c = '\0';
+ uint8_t c = '\0';
bool ret = false;
printf("Starting POSIX_APPEND\n");
@@ -69,14 +69,14 @@ bool run_posix_append(int dummy)
* with a file of 2 byte length.
*/
- written = cli_write(cli, fnum, 0, &c, 0, sizeof(c));
- if (written != sizeof(c)) {
- printf("cli_write failed\n");
+ status = cli_writeall(cli, fnum, 0, &c, 0, sizeof(c), NULL);
+ if (!NT_STATUS_IS_OK(status)) {
+ printf("cli_write failed: %s\n", nt_errstr(status));
goto fail;
}
- written = cli_write(cli, fnum, 0, &c, 0, sizeof(c));
- if (written != sizeof(c)) {
- printf("cli_write failed\n");
+ status = cli_writeall(cli, fnum, 0, &c, 0, sizeof(c), NULL);
+ if (!NT_STATUS_IS_OK(status)) {
+ printf("cli_write failed: %s\n", nt_errstr(status));
goto fail;
}