From b1d8aa6787323d9482a8fe53ff9e229f0cc4735e Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 3 Oct 2005 20:04:44 +0200 Subject: added structured ndbd exit codes BitKeeper/deleted/.del-ErrorMessages.hpp~9ab815d55a13433a: Delete: ndb/src/kernel/error/ErrorMessages.hpp config/ac-macros/ha_ndbcluster.m4: add ndb mgmapi to ndbcluster_includes extra/perror.c: perror to print also ndbd exit codes ndb/include/Makefile.am: added new ndbd exit code include file to src distribution ndb/include/kernel/signaldata/EventReport.hpp: backported from 5.1, included node id in event report signal ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp: backported from 5.1, included node id in event report signal --- extra/perror.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'extra/perror.c') diff --git a/extra/perror.c b/extra/perror.c index dedd558e4cf..919088ba42e 100644 --- a/extra/perror.c +++ b/extra/perror.c @@ -25,6 +25,7 @@ #include #ifdef HAVE_NDBCLUSTER_DB #include "../ndb/src/ndbapi/ndberror.c" +#include "../ndb/src/kernel/error/ndbd_exit_codes.c" #endif static my_bool verbose, print_all_codes; @@ -235,8 +236,11 @@ int main(int argc,char *argv[]) #ifdef HAVE_NDBCLUSTER_DB if (ndb_code) { - if (ndb_error_string(code, ndb_string, sizeof(ndb_string)) < 0) - msg= 0; + if ((ndb_error_string(code, ndb_string, sizeof(ndb_string)) < 0) && + (ndbd_exit_string(code, ndb_string, sizeof(ndb_string)) < 0)) + { + msg= 0; + } else msg= ndb_string; } -- cgit v1.2.1