From 9a6388179b9c4e13238ed91aebaca9b15e02408f Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Tue, 10 Feb 2004 11:33:35 +0000 Subject: Convert libcli routines to return NTSTATUS instead of BOOL. Again, the only users are smbclient and smbtorture. (This used to be commit 54cb508c78e5c1faa3ade46b46b165983c880d10) --- source4/libcli/clideltree.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source4/libcli/clideltree.c') diff --git a/source4/libcli/clideltree.c b/source4/libcli/clideltree.c index d28950f136..2bbfd9bd22 100644 --- a/source4/libcli/clideltree.c +++ b/source4/libcli/clideltree.c @@ -41,7 +41,7 @@ static void delete_fn(file_info *finfo, const char *name, void *state) asprintf(&s, "%s%s", n, finfo->name); if (finfo->mode & FILE_ATTRIBUTE_READONLY) { - if (!cli_setatr(dstate->tree, s, 0, 0)) { + if (NT_STATUS_IS_ERR(cli_setatr(dstate->tree, s, 0, 0))) { DEBUG(2,("Failed to remove READONLY on %s - %s\n", s, cli_errstr(dstate->tree))); } @@ -55,14 +55,14 @@ static void delete_fn(file_info *finfo, const char *name, void *state) FILE_ATTRIBUTE_DIRECTORY|FILE_ATTRIBUTE_HIDDEN|FILE_ATTRIBUTE_SYSTEM, delete_fn, state); free(s2); - if (!cli_rmdir(dstate->tree, s)) { + if (NT_STATUS_IS_ERR(cli_rmdir(dstate->tree, s))) { DEBUG(2,("Failed to delete %s - %s\n", s, cli_errstr(dstate->tree))); dstate->failed = True; } dstate->total_deleted++; } else { - if (!cli_unlink(dstate->tree, s)) { + if (NT_STATUS_IS_ERR(cli_unlink(dstate->tree, s))) { DEBUG(2,("Failed to delete %s - %s\n", s, cli_errstr(dstate->tree))); dstate->failed = True; @@ -87,7 +87,7 @@ int cli_deltree(struct cli_tree *tree, const char *dname) dstate.failed = False; /* it might be a file */ - if (cli_unlink(tree, dname)) { + if (NT_STATUS_IS_OK(cli_unlink(tree, dname))) { return 1; } if (NT_STATUS_EQUAL(cli_nt_error(tree), NT_STATUS_OBJECT_NAME_NOT_FOUND) || @@ -102,7 +102,7 @@ int cli_deltree(struct cli_tree *tree, const char *dname) FILE_ATTRIBUTE_DIRECTORY|FILE_ATTRIBUTE_HIDDEN|FILE_ATTRIBUTE_SYSTEM, delete_fn, &dstate); free(mask); - if (!cli_rmdir(dstate.tree, dname)) { + if (NT_STATUS_IS_ERR(cli_rmdir(dstate.tree, dname))) { DEBUG(2,("Failed to delete %s - %s\n", dname, cli_errstr(dstate.tree))); return -1; -- cgit