diff options
author | Volker Lendecke <vl@samba.org> | 2011-07-05 19:55:25 +0200 |
---|---|---|
committer | Volker Lendecke <vlendec@samba.org> | 2011-07-06 09:45:11 +0200 |
commit | 7d96a4594bcbaa75d82779d70e2dec658b9508d6 (patch) | |
tree | a4d9ccd7c7eafb03c78b9817d2983b90c1769950 /source3 | |
parent | c33a5a659c82eda365e4dacfe665ce401e92f476 (diff) | |
download | samba-7d96a4594bcbaa75d82779d70e2dec658b9508d6.tar.gz samba-7d96a4594bcbaa75d82779d70e2dec658b9508d6.tar.bz2 samba-7d96a4594bcbaa75d82779d70e2dec658b9508d6.zip |
s3: Remove cli_errstr from cmd_posix_open
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Jul 6 09:45:11 CEST 2011 on sn-devel-104
Diffstat (limited to 'source3')
-rw-r--r-- | source3/client/client.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/source3/client/client.c b/source3/client/client.c index 978f2e5dd6..e2efad82d8 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -2570,14 +2570,21 @@ static int cmd_posix_open(void) return 1; } - if (!NT_STATUS_IS_OK(cli_posix_open(targetcli, targetname, O_CREAT|O_RDWR, mode, &fnum))) { - if (!NT_STATUS_IS_OK(cli_posix_open(targetcli, targetname, O_CREAT|O_RDONLY, mode, &fnum))) { - d_printf("Failed to open file %s. %s\n", targetname, cli_errstr(cli)); + status = cli_posix_open(targetcli, targetname, O_CREAT|O_RDWR, mode, + &fnum); + if (!NT_STATUS_IS_OK(status)) { + status = cli_posix_open(targetcli, targetname, + O_CREAT|O_RDONLY, mode, &fnum); + if (!NT_STATUS_IS_OK(status)) { + d_printf("Failed to open file %s. %s\n", targetname, + nt_errstr(status)); } else { - d_printf("posix_open file %s: for readonly fnum %d\n", targetname, fnum); + d_printf("posix_open file %s: for readonly fnum %d\n", + targetname, fnum); } } else { - d_printf("posix_open file %s: for read/write fnum %d\n", targetname, fnum); + d_printf("posix_open file %s: for read/write fnum %d\n", + targetname, fnum); } return 0; |