[master] add "rndc -r" to print result code

4115.	[func]		"rndc -r" now prints the result code (e.g.,
			ISC_R_SUCCESS, ISC_R_TIMEOUT, etc) after
			running the requested command. [RT #38913]
This commit is contained in:
Evan Hunt
2015-05-05 16:39:09 -07:00
parent 76fbdc591b
commit 9e804040a2
15 changed files with 464 additions and 36 deletions

View File

@@ -29,8 +29,6 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: result.c,v 1.10 2007/08/28 07:20:43 tbox Exp $ */
/*! \file */
#include <config.h>
@@ -50,6 +48,15 @@ static const char *text[ISCCC_R_NRESULTS] = {
"duplicate" /* 6 */
};
static const char *ids[ISCCC_R_NRESULTS] = {
"ISCCC_R_UNKNOWNVERSION",
"ISCCC_R_SYNTAX",
"ISCCC_R_BADAUTH",
"ISCCC_R_EXPIRED",
"ISCCC_R_CLOCKSKEW",
"ISCCC_R_DUPLICATE",
};
#define ISCCC_RESULT_RESULTSET 2
static isc_once_t once = ISC_ONCE_INIT;
@@ -64,6 +71,13 @@ initialize_action(void) {
if (result != ISC_R_SUCCESS)
UNEXPECTED_ERROR(__FILE__, __LINE__,
"isc_result_register() failed: %u", result);
result = isc_result_registerids(ISC_RESULTCLASS_ISCCC, ISCCC_R_NRESULTS,
ids, isccc_msgcat,
ISCCC_RESULT_RESULTSET);
if (result != ISC_R_SUCCESS)
UNEXPECTED_ERROR(__FILE__, __LINE__,
"isc_result_registerids() failed: %u", result);
}
static void