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/util/sss_cli_cmd.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/util/sss_cli_cmd.h (limited to 'src/util/sss_cli_cmd.h') diff --git a/src/util/sss_cli_cmd.h b/src/util/sss_cli_cmd.h new file mode 100644 index 00000000..66ad076b --- /dev/null +++ b/src/util/sss_cli_cmd.h @@ -0,0 +1,28 @@ +/* + SSSD - cmd2str util + + Copyright (C) Petr Cech 2015 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +#ifndef __SSS_CLI_CMD_H__ +#define __SSS_CLI_CMD_H__ + +#include "sss_client/sss_cli.h" + +/* Translate sss_cli_command to human readable form. */ +const char *sss_cmd2str(enum sss_cli_command cmd); + +#endif /* __SSS_CLI_CMD_H__ */ -- cgit