diff options
author | Martin Schwenke <martin@meltin.net> | 2013-05-21 15:41:56 +1000 |
---|---|---|
committer | Martin Schwenke <martin@meltin.net> | 2013-05-24 16:04:50 +1000 |
commit | 140f0cfd3b73ad2f1dbb6ce4870fc0be679fd4fd (patch) | |
tree | 86d3970168f07c07d768447c3305e56fe5f248c8 /ctdb/client | |
parent | e78b064dcc0c6a0462574ae3193b3d4d24f5fac0 (diff) | |
download | samba-140f0cfd3b73ad2f1dbb6ce4870fc0be679fd4fd.tar.gz samba-140f0cfd3b73ad2f1dbb6ce4870fc0be679fd4fd.tar.xz samba-140f0cfd3b73ad2f1dbb6ce4870fc0be679fd4fd.zip |
ctdbd: Update the get_tunable code to return -EINVAL for unknown tunable
Otherwise callers can't tell the difference between some other failure
(e.g. memory allocation failure) and an unknown tunable.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 03fd90d41f9cd9b8c42dc6b8b8d46ae19101a544)
Diffstat (limited to 'ctdb/client')
-rw-r--r-- | ctdb/client/ctdb_client.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ctdb/client/ctdb_client.c b/ctdb/client/ctdb_client.c index e930bffc399..665426cd923 100644 --- a/ctdb/client/ctdb_client.c +++ b/ctdb/client/ctdb_client.c @@ -2502,7 +2502,7 @@ int ctdb_ctrl_get_tunable(struct ctdb_context *ctdb, talloc_free(data.dptr); if (ret != 0 || res != 0) { DEBUG(DEBUG_ERR,(__location__ " ctdb_control for get_tunable failed\n")); - return -1; + return ret != 0 ? ret : res; } if (outdata.dsize != sizeof(uint32_t)) { |