diff options
author | Tim Potter <tpot@samba.org> | 2004-02-10 11:33:35 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2004-02-10 11:33:35 +0000 |
commit | 9a6388179b9c4e13238ed91aebaca9b15e02408f (patch) | |
tree | 227d5e57dd0948abac7564a0d07f8fab8e6ae659 /source4/torture/raw/read.c | |
parent | e159cc7e05a46fcc652873b382b848f5d524d8b6 (diff) | |
download | samba-9a6388179b9c4e13238ed91aebaca9b15e02408f.tar.gz samba-9a6388179b9c4e13238ed91aebaca9b15e02408f.tar.bz2 samba-9a6388179b9c4e13238ed91aebaca9b15e02408f.zip |
Convert libcli routines to return NTSTATUS instead of BOOL. Again, the
only users are smbclient and smbtorture.
(This used to be commit 54cb508c78e5c1faa3ade46b46b165983c880d10)
Diffstat (limited to 'source4/torture/raw/read.c')
-rw-r--r-- | source4/torture/raw/read.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/source4/torture/raw/read.c b/source4/torture/raw/read.c index 0836b4d021..3e9547856c 100644 --- a/source4/torture/raw/read.c +++ b/source4/torture/raw/read.c @@ -91,7 +91,7 @@ static BOOL test_read(struct cli_state *cli, TALLOC_CTX *mem_ctx) buf = talloc_zero(mem_ctx, maxsize); if (cli_deltree(cli->tree, BASEDIR) == -1 || - !cli_mkdir(cli->tree, BASEDIR)) { + NT_STATUS_IS_ERR(cli_mkdir(cli->tree, BASEDIR))) { printf("Unable to setup %s - %s\n", BASEDIR, cli_errstr(cli->tree)); return False; } @@ -178,7 +178,7 @@ static BOOL test_read(struct cli_state *cli, TALLOC_CTX *mem_ctx) printf("Trying locked region\n"); cli->session->pid++; - if (!cli_lock(cli->tree, fnum, 103, 1, 0, WRITE_LOCK)) { + if (NT_STATUS_IS_ERR(cli_lock(cli->tree, fnum, 103, 1, 0, WRITE_LOCK))) { printf("Failed to lock file at %d\n", __LINE__); ret = False; goto done; @@ -217,7 +217,7 @@ static BOOL test_lockread(struct cli_state *cli, TALLOC_CTX *mem_ctx) buf = talloc_zero(mem_ctx, maxsize); if (cli_deltree(cli->tree, BASEDIR) == -1 || - !cli_mkdir(cli->tree, BASEDIR)) { + NT_STATUS_IS_ERR(cli_mkdir(cli->tree, BASEDIR))) { printf("Unable to setup %s - %s\n", BASEDIR, cli_errstr(cli->tree)); return False; } @@ -322,7 +322,7 @@ static BOOL test_lockread(struct cli_state *cli, TALLOC_CTX *mem_ctx) printf("Trying locked region\n"); cli->session->pid++; - if (!cli_lock(cli->tree, fnum, 103, 1, 0, WRITE_LOCK)) { + if (NT_STATUS_IS_ERR(cli_lock(cli->tree, fnum, 103, 1, 0, WRITE_LOCK))) { printf("Failed to lock file at %d\n", __LINE__); ret = False; goto done; @@ -360,7 +360,7 @@ static BOOL test_readx(struct cli_state *cli, TALLOC_CTX *mem_ctx) buf = talloc_zero(mem_ctx, maxsize); if (cli_deltree(cli->tree, BASEDIR) == -1 || - !cli_mkdir(cli->tree, BASEDIR)) { + NT_STATUS_IS_ERR(cli_mkdir(cli->tree, BASEDIR))) { printf("Unable to setup %s - %s\n", BASEDIR, cli_errstr(cli->tree)); return False; } @@ -489,7 +489,7 @@ static BOOL test_readx(struct cli_state *cli, TALLOC_CTX *mem_ctx) printf("Trying locked region\n"); cli->session->pid++; - if (!cli_lock(cli->tree, fnum, 103, 1, 0, WRITE_LOCK)) { + if (NT_STATUS_IS_ERR(cli_lock(cli->tree, fnum, 103, 1, 0, WRITE_LOCK))) { printf("Failed to lock file at %d\n", __LINE__); ret = False; goto done; @@ -511,7 +511,7 @@ static BOOL test_readx(struct cli_state *cli, TALLOC_CTX *mem_ctx) CHECK_STATUS(status, NT_STATUS_OK); CHECK_VALUE(io.readx.out.nread, 0); - if (!cli_lock64(cli->tree, fnum, io.readx.in.offset, 1, 0, WRITE_LOCK)) { + if (NT_STATUS_IS_ERR(cli_lock64(cli->tree, fnum, io.readx.in.offset, 1, 0, WRITE_LOCK))) { printf("Failed to lock file at %d\n", __LINE__); ret = False; goto done; @@ -547,7 +547,7 @@ static BOOL test_readbraw(struct cli_state *cli, TALLOC_CTX *mem_ctx) buf = talloc_zero(mem_ctx, maxsize); if (cli_deltree(cli->tree, BASEDIR) == -1 || - !cli_mkdir(cli->tree, BASEDIR)) { + NT_STATUS_IS_ERR(cli_mkdir(cli->tree, BASEDIR))) { printf("Unable to setup %s - %s\n", BASEDIR, cli_errstr(cli->tree)); return False; } @@ -660,7 +660,7 @@ static BOOL test_readbraw(struct cli_state *cli, TALLOC_CTX *mem_ctx) printf("Trying locked region\n"); cli->session->pid++; - if (!cli_lock(cli->tree, fnum, 103, 1, 0, WRITE_LOCK)) { + if (NT_STATUS_IS_ERR(cli_lock(cli->tree, fnum, 103, 1, 0, WRITE_LOCK))) { printf("Failed to lock file at %d\n", __LINE__); ret = False; goto done; |