From 11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92a Mon Sep 17 00:00:00 2001 From: Petr Cech Date: Wed, 8 Jul 2015 07:17:28 -0400 Subject: UTIL: Function 2string for enum sss_cli_command MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Improvement of debug messages. Instead of:"(0x0400): Running command [17]..." We could see:"(0x0400): Running command [17][SSS_NSS_GETPWNAM]..." (It's not used in sss_client. There are only hex numbers of commands.) Resolves: https://fedorahosted.org/sssd/ticket/2708 Reviewed-by: Lukáš Slebodník --- src/tools/tools_mc_util.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/tools') diff --git a/src/tools/tools_mc_util.c b/src/tools/tools_mc_util.c index 65c46109..41d8a655 100644 --- a/src/tools/tools_mc_util.c +++ b/src/tools/tools_mc_util.c @@ -27,6 +27,7 @@ #include "util/util.h" #include "tools/tools_util.h" #include "util/mmap_cache.h" +#include "util/sss_cli_cmd.h" #include "sss_client/sss_cli.h" /* This is a copy of sss_mc_set_recycled present in @@ -260,7 +261,8 @@ static errno_t sss_mc_refresh_ent(const char *name, enum sss_tools_ent ent) } if (cmd == SSS_CLI_NULL) { - DEBUG(SSSDBG_OP_FAILURE, "Unknown object %d to refresh\n", cmd); + DEBUG(SSSDBG_OP_FAILURE, "Unknown object [%d][%s] to refresh\n", + cmd, sss_cmd2str(cmd)); return EINVAL; } -- cgit