[PATCHES] Two small fixes for ctdb command

Amitay Isaacs amitay at gmail.com
Mon Dec 10 01:01:49 UTC 2018


On Sat, Dec 8, 2018 at 8:49 AM Christof Schmitt via samba-technical
<samba-technical at lists.samba.org> wrote:
>
> From d0b081f07d20183d3ad13fd710be20f7fa68b35d Mon Sep 17 00:00:00 2001 From: Christof Schmitt Date: Mon, 22 May 2017 12:31:35 -0700 Subject: [PATCH 1/2] ctdb: Fix hex to int conversion in h2i Signed-off-by: Christof Schmitt --- ctdb/tools/ctdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ctdb/tools/ctdb.c b/ctdb/tools/ctdb.c index f96167f9366..1844f1ff196 100644 --- a/ctdb/tools/ctdb.c +++ b/ctdb/tools/ctdb.c @@ -587,7 +587,7 @@ static int h2i(char h) return h - 'a' + 10; } if (h >= 'A' && h <= 'F') { - return h - 'f' + 10; + return h - 'A' + 10; } return h - '0'; } -- 2.17.0 From 18c12e428dcfd2d831ba02db5a9ba1b1c7a4719b Mon Sep 17 00:00:00 2001 From: Christof Schmitt Date: Mon, 22 May 2017 16:28:40 -0700 Subject: [PATCH 2/2] ctdb: Remove parameter from pfetch usage info The code does not implement saving the record data to a file, so update the usage info accordingly. Signed-off-by: Christof Schmitt --- ctdb/tools/ctdb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ctdb/tools/ctdb.c b/ctdb/tools/ctdb.c index 1844f1ff196..b598a866c9b 100644 --- a/ctdb/tools/ctdb.c +++ b/ctdb/tools/ctdb.c @@ -4804,7 +4804,7 @@ static int control_pfetch(TALLOC_CTX *mem_ctx, struct ctdb_context *ctdb, TDB_DATA key, data; int ret; - if (argc < 2 || argc > 3) { + if (argc != 2) { usage("pfetch"); } @@ -5973,7 +5973,7 @@ static const struct ctdb_cmd { { "setdbsticky", control_setdbsticky, false, true, "enable sticky records", ""}, { "pfetch", control_pfetch, false, false, - "fetch record from persistent database", " []" }, + "fetch record from persistent database", " " }, { "pstore", control_pstore, false, false, "write record to persistent database", " " }, { "pdelete", control_pdelete, false, false, -- 2.17.0

Pushed to autobuild.

Amitay.



More information about the samba-technical mailing list