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/server/ctdb_tunables.c | |
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/server/ctdb_tunables.c')
-rw-r--r-- | ctdb/server/ctdb_tunables.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ctdb/server/ctdb_tunables.c b/ctdb/server/ctdb_tunables.c index 84fb949007..365c6ba558 100644 --- a/ctdb/server/ctdb_tunables.c +++ b/ctdb/server/ctdb_tunables.c @@ -128,7 +128,7 @@ int32_t ctdb_control_get_tunable(struct ctdb_context *ctdb, TDB_DATA indata, talloc_free(name); if (i == ARRAY_SIZE(tunable_map)) { - return -1; + return -EINVAL; } val = *(uint32_t *)(tunable_map[i].offset + (uint8_t*)&ctdb->tunable); |