Update of /cvsroot/opendlm/opendlm/src/api In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13449/src/api Modified Files: api_ais_lock.c api_glue.c api_group.c api_init.c api_purge.c api_scn.c api_tune.c api_vms.c print.c Log Message: merge with debug-dbprintf-branch * unified logging under dlm_dbprintf * removal of unnecessary linux .h includes * introduction of dlm_module.h to consolidate linux module includes Index: api_ais_lock.c =================================================================== RCS file: /cvsroot/opendlm/opendlm/src/api/api_ais_lock.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** api_ais_lock.c 5 May 2005 18:55:01 -0000 1.5 --- api_ais_lock.c 25 May 2005 16:25:17 -0000 1.6 *************** *** 18,30 **** #include "pti.h" - #ifdef HAVING_NLS_ON_LINUX - /* for NLS */ - #include "general_msg.h" - #define MSGSTR(Num, Str) catgets((struct _catalog_descriptor*)get_catd("general.cat"), GENERAL, Num, Str) - #else /* HAVING_NLS_ON_LINUX */ - #define MSGSTR(Num, Str) Str - #endif /* HAVING_NLS_ON_LINUX */ - /* end of NLS */ - #include "api_ais_lock.h" --- 18,21 ---- *************** *** 604,608 **** if (response.clm_status == DLM_WORKING) { ! printf(MSGSTR(DLM_WORKING, "DLM_WORKING_TER returned from API call!!\n")); if (api_response(&response) != 0) { ret_val = set_dlm_errno(DLM_NOLOCKMGR); --- 595,599 ---- if (response.clm_status == DLM_WORKING) { ! printf("DLM_WORKING_TER returned from API call!!\n"); if (api_response(&response) != 0) { ret_val = set_dlm_errno(DLM_NOLOCKMGR); Index: api_glue.c =================================================================== RCS file: /cvsroot/opendlm/opendlm/src/api/api_glue.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** api_glue.c 5 May 2005 18:55:01 -0000 1.6 --- api_glue.c 25 May 2005 16:25:17 -0000 1.7 *************** *** 60,74 **** #include "api_data.h" - #ifdef HAVING_NLS_ON_LINUX - /* for NLS */ - #include "general_msg.h" - #define MSGSTR(Num, Str) catgets(get_catd("general.cat"), GENERAL, Num, Str) - #else /* HAVING_NLS_ON_LINUX */ - #define MSGSTR(Num, Str) Str - #endif /* HAVING_NLS_ON_LINUX */ - /* end of NLS */ - - /* ============================================================ */ - #ifndef __KERNEL__ /* --- 60,63 ---- *************** *** 420,426 **** * DBG_BASIC, DBG_FUNC, DBG_STATS, DBG_COMM, DBG_DEADLOCK, DBG_CTI * DBG_CLMLOCK, DBG_UNIXLOCK, DBG_LOCK, DBG_RESOURCE,DBG_DYNRES, ! * DBG_BATCH,DBG_TIMEOUT,DBG_NETFAIL,DBG_CONFIG,DBG_SCN,DBG_DIRECT, * DBG_MIGR,DBG_MIGR2, DBG_RECOV,DBG_TUNE,DBG_SYNC,DBG_LOCAL ! * DBG_KDBX, DBG_FAILSYNC, DBG_AST defined in include/clmstructs.h * Return value: * Value returned from ioctl. --- 409,415 ---- * DBG_BASIC, DBG_FUNC, DBG_STATS, DBG_COMM, DBG_DEADLOCK, DBG_CTI * DBG_CLMLOCK, DBG_UNIXLOCK, DBG_LOCK, DBG_RESOURCE,DBG_DYNRES, ! * DBG_BATCH,DBG_TIMEOUT,DBG_CCCP,DBG_CONFIG,DBG_SCN,DBG_DIRECT, * DBG_MIGR,DBG_MIGR2, DBG_RECOV,DBG_TUNE,DBG_SYNC,DBG_LOCAL ! * DBG_KDBX, DBG_unused, DBG_AST defined in include/clmstructs.h * Return value: * Value returned from ioctl. Index: api_group.c =================================================================== RCS file: /cvsroot/opendlm/opendlm/src/api/api_group.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** api_group.c 27 Sep 2002 11:52:42 -0000 1.1.1.1 --- api_group.c 25 May 2005 16:25:17 -0000 1.2 *************** *** 65,76 **** #include "pti.h" - #ifdef HAVING_NLS_ON_LINUX - /* for NLS */ - #include "general_msg.h" - #define MSGSTR(Num, Str) catgets(get_catd("general.cat"), GENERAL, Num, Str) - #else /* HAVING_NLS_ON_LINUX */ - #define MSGSTR(Num, Str) Str - #endif /* HAVING_NLS_ON_LINUX */ - /* end of NLS */ #endif /* __KERNEL__ */ --- 65,68 ---- Index: api_init.c =================================================================== RCS file: /cvsroot/opendlm/opendlm/src/api/api_init.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** api_init.c 5 May 2005 18:55:01 -0000 1.9 --- api_init.c 25 May 2005 16:25:17 -0000 1.10 *************** *** 40,43 **** --- 40,44 ---- #include "config.h" + #include "dlm_log.h" #ifdef __KERNEL__ *************** *** 84,96 **** #include "clmutex_r.h" - #ifdef HAVING_NLS_ON_LINUX - /* for NLS */ - #include "general_msg.h" - #define MSGSTR(Num, Str) catgets((struct _catalog_descriptor*)get_catd("general.cat"), GENERAL, Num, Str) - #else /* HAVING_NLS_ON_LINUX */ - #define MSGSTR(Num, Str) Str - #endif /* HAVING_NLS_ON_LINUX */ - /* end of NLS */ - #include "api_data.h" #include "api_glue.h" --- 85,88 ---- *************** *** 175,179 **** rc = kmem_cache_destroy( dlm_keventd_cache ); if (rc) { ! bsdlog(LOG_ERR, "[KAPI:%s] kmem_cache_destroy of dlm_keventd_cache failed\n", __FUNCTION__); --- 167,171 ---- rc = kmem_cache_destroy( dlm_keventd_cache ); if (rc) { ! dlm_log(LOG_ERR, "[KAPI:%s] kmem_cache_destroy of dlm_keventd_cache failed\n", __FUNCTION__); *************** *** 372,377 **** } if (response->clm_sequence != seq) { ! fprintf(stderr, MSGSTR(TRANS_MISMATCH, ! "Transaction mismatch detected in API\n")); return -1; } --- 364,368 ---- } if (response->clm_sequence != seq) { ! fprintf(stderr, "Transaction mismatch detected in API\n"); return -1; } *************** *** 440,445 **** if (response->clm_sequence != seq) { ! fprint_error( MSGSTR(TRANS_MISMATCH, ! "Transaction mismatch detected in API\n")); return -1; } --- 431,435 ---- if (response->clm_sequence != seq) { ! fprint_error("Transaction mismatch detected in API\n"); return -1; } Index: api_purge.c =================================================================== RCS file: /cvsroot/opendlm/opendlm/src/api/api_purge.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** api_purge.c 1 Apr 2004 16:52:53 -0000 1.2 --- api_purge.c 25 May 2005 16:25:17 -0000 1.3 *************** *** 29,33 **** * COMPONENT_NAME: DLM LIB * ! * FUNCTIONS: MSGSTR * clm_purge */ --- 29,33 ---- * COMPONENT_NAME: DLM LIB * ! * FUNCTIONS: * clm_purge */ *************** *** 68,80 **** #include "pti.h" - #ifdef HAVING_NLS_ON_LINUX - /* for NLS */ - #include "general_msg.h" - #define MSGSTR(Num, Str) catgets(get_catd("general.cat"), GENERAL, Num, Str) - #else /* HAVING_NLS_ON_LINUX */ - #define MSGSTR(Num, Str) Str - #endif /* HAVING_NLS_ON_LINUX */ - /* end of NLS */ - #include "api_data.h" #include "api_init.h" --- 68,71 ---- Index: api_scn.c =================================================================== RCS file: /cvsroot/opendlm/opendlm/src/api/api_scn.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** api_scn.c 27 Sep 2002 11:52:42 -0000 1.1.1.1 --- api_scn.c 25 May 2005 16:25:17 -0000 1.2 *************** *** 47,59 **** #include "pti.h" - #ifdef HAVING_NLS_ON_LINUX - /* for NLS */ - #include "general_msg.h" - #define MSGSTR(Num, Str) catgets((struct _catalog_descriptor*)get_catd("general.cat"), GENERAL, Num, Str) - #else /* HAVING_NLS_ON_LINUX */ - #define MSGSTR(Num, Str) Str - #endif /* HAVING_NLS_ON_LINUX */ - /* end of NLS */ - #include "api_data.h" #include "api_init.h" --- 47,50 ---- *************** *** 118,123 **** if (response.clm_status == DLM_WORKING) { ! printf(MSGSTR(DLM_WORKING, ! "DLM_WORKING_TER returned from API call!!\n")); if (api_response(&response) != 0) { ret_val = set_dlm_errno(DLM_NOLOCKMGR); --- 109,113 ---- if (response.clm_status == DLM_WORKING) { ! printf("DLM_WORKING_TER returned from API call!!\n"); if (api_response(&response) != 0) { ret_val = set_dlm_errno(DLM_NOLOCKMGR); Index: api_tune.c =================================================================== RCS file: /cvsroot/opendlm/opendlm/src/api/api_tune.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** api_tune.c 27 Sep 2002 11:52:42 -0000 1.1.1.1 --- api_tune.c 25 May 2005 16:25:17 -0000 1.2 *************** *** 51,63 **** #include "pti.h" - #ifdef HAVING_NLS_ON_LINUX - /* for NLS */ - #include "general_msg.h" - #define MSGSTR(Num, Str) catgets((struct _catalog_descriptor*)get_catd("general.cat"), GENERAL, Num, Str) - #else /* HAVING_NLS_ON_LINUX */ - #define MSGSTR(Num, Str) Str - #endif /* HAVING_NLS_ON_LINUX */ - /* end of NLS */ - #include "api_data.h" #include "api_init.h" --- 51,54 ---- *************** *** 128,132 **** if (response.clm_status == DLM_WORKING) { ! printf(MSGSTR(DLM_WORKING, "DLM_WORKING_TER returned from API call!!\n")); if (api_response(&response) != 0) { ret_val = set_dlm_errno(DLM_NOLOCKMGR); --- 119,123 ---- if (response.clm_status == DLM_WORKING) { ! printf("DLM_WORKING_TER returned from API call!!\n"); if (api_response(&response) != 0) { ret_val = set_dlm_errno(DLM_NOLOCKMGR); *************** *** 224,228 **** if (response.clm_status == DLM_WORKING) { ! printf(MSGSTR(DLM_WORKING, "DLM_WORKING_TER returned from API call!!\n")); if (api_response(&response) != 0) { ret_val = set_dlm_errno(DLM_NOLOCKMGR); --- 215,219 ---- if (response.clm_status == DLM_WORKING) { ! printf("DLM_WORKING_TER returned from API call!!\n"); if (api_response(&response) != 0) { ret_val = set_dlm_errno(DLM_NOLOCKMGR); Index: api_vms.c =================================================================== RCS file: /cvsroot/opendlm/opendlm/src/api/api_vms.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** api_vms.c 5 May 2005 18:55:01 -0000 1.10 --- api_vms.c 25 May 2005 16:25:17 -0000 1.11 *************** *** 76,89 **** #include "pti.h" - #ifdef HAVING_NLS_ON_LINUX - /* for NLS */ - #include "general_msg.h" - #define MSGSTR(Num, Str) catgets((struct _catalog_descriptor*)get_catd("general.cat"), GENERAL, Num, Str) - #else /* HAVING_NLS_ON_LINUX */ - #define MSGSTR(Num, Str) Str - #endif /* HAVING_NLS_ON_LINUX */ - /* end of NLS */ - - #include "api_data.h" #include "api_init.h" --- 76,79 ---- *************** *** 601,605 **** if (response.clm_status == DLM_WORKING) { ! printf(MSGSTR(DLM_WORKING, "DLM_WORKING_TER returned from API call!!\n")); if (api_response(&response) != 0) { ret_val = set_dlm_errno(DLM_NOLOCKMGR); --- 591,595 ---- if (response.clm_status == DLM_WORKING) { ! printf("DLM_WORKING_TER returned from API call!!\n"); if (api_response(&response) != 0) { ret_val = set_dlm_errno(DLM_NOLOCKMGR); Index: print.c =================================================================== RCS file: /cvsroot/opendlm/opendlm/src/api/print.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** print.c 27 Sep 2002 11:52:42 -0000 1.1.1.1 --- print.c 25 May 2005 16:25:17 -0000 1.2 *************** *** 39,51 **** #include "dlm.h" - #ifdef HAVING_NLS_ON_LINUX - /* for NLS */ - #include "general_msg.h" - #define MSGSTR(Num, Str) catgets((struct _catalog_descriptor*)get_catd("general.cat"), GENERAL, Num, Str) - #else /* HAVING_NLS_ON_LINUX */ - #define MSGSTR(Num, Str) Str - #endif /* HAVING_NLS_ON_LINUX */ - /* end of NLS */ - /* ============================================================ */ --- 39,42 ---- *************** *** 60,66 **** static char buffer[50]; if (err < 0) { ! sprintf(buffer, ! MSGSTR(DLM_ERROR,"DLM Error %d\n"), ! err); return buffer; } --- 51,55 ---- static char buffer[50]; if (err < 0) { ! sprintf(buffer, "DLM Error %d\n", err); return buffer; } *************** *** 74,80 **** dlm_perror(const char *s) { ! fprintf(stderr, ! MSGSTR(ERROR_MSG,"%1$s: %2$s\n"), ! s, ! dlm_errmsg(dlm_errno)); } --- 63,66 ---- dlm_perror(const char *s) { ! fprintf(stderr, "%1$s: %2$s\n", s, dlm_errmsg(dlm_errno)); } |