ctdbd: Update the get_tunable code to return -EINVAL for unknown tunable
[obnox/ctdb.git] / client / ctdb_client.c
index e930bffc399a8bf5a92e8cf26b63b4f2991cb113..665426cd9230d75f2aaf4572f128b575f44cf509 100644 (file)
@@ -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)) {