git.samba.org
/
nivanova
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f3f78bb
)
Patch from waider to set exit code of last executed command specified
author
Tim Potter
<tpot@samba.org>
Wed, 23 Apr 2003 07:10:28 +0000
(07:10 +0000)
committer
Tim Potter
<tpot@samba.org>
Wed, 23 Apr 2003 07:10:28 +0000
(07:10 +0000)
as an argument to -c.
(This used to be commit
048aeefcdc12d93bc728d104bbf38ea8becfb16c
)
source3/rpcclient/rpcclient.c
patch
|
blob
|
history
diff --git
a/source3/rpcclient/rpcclient.c
b/source3/rpcclient/rpcclient.c
index bf016e94c7c69cfe0db33d56e4ba148241f88a0e..0411212e8c8a7ebdad2d6bf4cb6fb477277b675d 100644
(file)
--- a/
source3/rpcclient/rpcclient.c
+++ b/
source3/rpcclient/rpcclient.c
@@
-628,13
+628,15
@@
out_free:
if (cmdstr && cmdstr[0]) {
char *cmd;
char *p = cmdstr;
+ int result = 0;
while((cmd=next_command(&p)) != NULL) {
- process_cmd(cli, cmd);
+ NTSTATUS cmd_result = process_cmd(cli, cmd);
+ result = NT_STATUS_IS_ERR(cmd_result);
}
cli_shutdown(cli);
- return
0
;
+ return
result
;
}
/* Loop around accepting commands */