mirror of
https://github.com/ceph/ceph
synced 2025-03-06 00:10:04 +00:00
ceph: propagate do_command()'s return value to user space
We were returning '1' regardless of what do_command() returned in case
of error. This would make building tools relying on command error codes
short of useless, and forced them to rely instead on error messages.
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
(cherry picked from commit e91405d540
)
This commit is contained in:
parent
807487c681
commit
06a1e9c0ec
@ -337,8 +337,9 @@ int main(int argc, const char **argv)
|
||||
}
|
||||
|
||||
bufferlist obl;
|
||||
if (do_command(ctx, cmd, indata, obl) < 0) {
|
||||
ret = 1;
|
||||
ret = do_command(ctx, cmd, indata, obl);
|
||||
if (ret < 0) {
|
||||
ret = -ret;
|
||||
break;
|
||||
}
|
||||
outbl.claim(obl);
|
||||
|
Loading…
Reference in New Issue
Block a user