summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorBjörn Baumbach <bb@sernet.de>2011-02-07 11:27:02 +0100
committerStefan Metzmacher <metze@samba.org>2011-05-18 10:55:52 +0200
commit23e23d083602d59ec500b4abfc331a451f6e5dbb (patch)
treeb2efec5b50f434a445702740bea5553bb5e5d4d8 /source3
parent26f7c0771bfba85c0d203996aee1d3ada04e56b6 (diff)
downloadsamba-23e23d083602d59ec500b4abfc331a451f6e5dbb.tar.gz
samba-23e23d083602d59ec500b4abfc331a451f6e5dbb.tar.bz2
samba-23e23d083602d59ec500b4abfc331a451f6e5dbb.zip
s3-torture/nbio.c: Fix cli_errstr() usage (part of bug #7864)
Convert cli_errstr() to nt_errstr() Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/torture/nbio.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/source3/torture/nbio.c b/source3/torture/nbio.c
index 7634f52b14..0da6bc084e 100644
--- a/source3/torture/nbio.c
+++ b/source3/torture/nbio.c
@@ -135,10 +135,13 @@ void nb_setup(struct cli_state *cli)
void nb_unlink(const char *fname)
{
- if (!NT_STATUS_IS_OK(cli_unlink(c, fname, FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN))) {
+ NTSTATUS status;
+
+ status = cli_unlink(c, fname, FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN);
+ if (!NT_STATUS_IS_OK(status)) {
#if NBDEBUG
printf("(%d) unlink %s failed (%s)\n",
- line_count, fname, cli_errstr(c));
+ line_count, fname, nt_errstr(status));
#endif
}
}
@@ -166,7 +169,7 @@ void nb_createx(const char *fname,
create_options, 0, &fd);
if (!NT_STATUS_IS_OK(status) && handle != -1) {
printf("ERROR: cli_ntcreate failed for %s - %s\n",
- fname, cli_errstr(c));
+ fname, nt_errstr(status));
exit(1);
}
if (NT_STATUS_IS_OK(status) && handle == -1) {
@@ -233,18 +236,24 @@ void nb_close(int handle)
void nb_rmdir(const char *fname)
{
- if (!NT_STATUS_IS_OK(cli_rmdir(c, fname))) {
+ NTSTATUS status;
+
+ status = cli_rmdir(c, fname);
+ if (!NT_STATUS_IS_OK(status)) {
printf("ERROR: rmdir %s failed (%s)\n",
- fname, cli_errstr(c));
+ fname, nt_errstr(status));
exit(1);
}
}
void nb_rename(const char *oldname, const char *newname)
{
- if (!NT_STATUS_IS_OK(cli_rename(c, oldname, newname))) {
+ NTSTATUS status;
+
+ status = cli_rename(c, oldname, newname);
+ if (!NT_STATUS_IS_OK(status)) {
printf("ERROR: rename %s %s failed (%s)\n",
- oldname, newname, cli_errstr(c));
+ oldname, newname, nt_errstr(status));
exit(1);
}
}