Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Evergreen:11.2
openais
openais-dprintf.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File openais-dprintf.diff of Package openais
--- exec/amf.c +++ exec/amf.c @@ -417,7 +417,7 @@ unsigned int *joined_list, int joined_list_entries, struct memb_ring_id *ring_id) { - dprintf ("amf_confchg_fn : type = %d,mnum = %d,jnum = %d,lnum = %d\n", + my_dprintf ("amf_confchg_fn : type = %d,mnum = %d,jnum = %d,lnum = %d\n", configuration_type,member_list_entries, joined_list_entries,left_list_entries); } @@ -431,7 +431,7 @@ comp = amf_pd->comp; assert (comp != NULL); comp->conn = NULL; - dprintf ("Lib exit from comp %s\n", getSaNameT (&comp->name)); + my_dprintf ("Lib exit from comp %s\n", getSaNameT (&comp->name)); return (0); } --- exec/amfcluster.c +++ exec/amfcluster.c @@ -107,7 +107,7 @@ struct amf_application *app; struct amf_cluster *cluster = _cluster; - dprintf("2nd Cluster start timer expired, assigning workload to application\n"); + my_dprintf("2nd Cluster start timer expired, assigning workload to application\n"); for (app = cluster->application_head; app != NULL; app = app->next) { amf_application_assign_workload (app, this_amf_node); --- exec/amfcomp.c +++ exec/amfcomp.c @@ -557,7 +557,7 @@ static int clc_csi_remove_callback (struct amf_comp *comp) { - dprintf ("clc_tcsi_remove_callback\n"); + my_dprintf ("clc_tcsi_remove_callback\n"); return (0); } @@ -597,7 +597,7 @@ struct clc_command_run_data *clc_command_run_data; - dprintf ("clc_cli_cleanup\n"); + my_dprintf ("clc_cli_cleanup\n"); clc_command_run_data = malloc (sizeof (struct clc_command_run_data)); if (clc_command_run_data == NULL) { openais_exit_error (AIS_DONE_OUT_OF_MEMORY); @@ -619,7 +619,7 @@ static int clc_cli_cleanup_local (struct amf_comp *comp) { - dprintf ("clc_cli_cleanup_local\n"); + my_dprintf ("clc_cli_cleanup_local\n"); return (0); } @@ -628,7 +628,7 @@ { int res; - dprintf ("clc terminate for comp %s\n", getSaNameT (&comp->name)); + my_dprintf ("clc terminate for comp %s\n", getSaNameT (&comp->name)); assert (0); operational_state_comp_set (comp, SA_AMF_OPERATIONAL_DISABLED); comp_presence_state_set (comp, SA_AMF_PRESENCE_TERMINATING); @@ -794,7 +794,7 @@ struct res_lib_amf_csiremovecallback res_lib_amf_csiremovecallback; struct csi_remove_callback_data *csi_remove_callback_data; - dprintf ("\t%s\n", getSaNameT (&comp->name)); + my_dprintf ("\t%s\n", getSaNameT (&comp->name)); res_lib_amf_csiremovecallback.header.id = MESSAGE_RES_AMF_CSIREMOVECALLBACK; res_lib_amf_csiremovecallback.header.size = sizeof (struct res_lib_amf_csiremovecallback); @@ -922,7 +922,7 @@ static void healthcheck_deactivate ( struct amf_healthcheck *healthcheck_active) { - dprintf ("deactivating healthcheck for component %s\n", + my_dprintf ("deactivating healthcheck for component %s\n", getSaNameT (&healthcheck_active->comp->name)); poll_timer_delete (aisexec_poll_handle, @@ -1229,7 +1229,7 @@ goto error_exit; } - dprintf ("Healthcheckstart: '%s', key '%s'", + my_dprintf ("Healthcheckstart: '%s', key '%s'", comp->name.value, healthcheckKey->key); /* @@ -1285,7 +1285,7 @@ struct amf_healthcheck *healthcheck; SaAisErrorT error = SA_AIS_OK; - dprintf ("Healthcheckstop: '%s', key '%s'", + my_dprintf ("Healthcheckstop: '%s', key '%s'", comp->name.value, healthcheckKey->key); if (healthcheckKey == NULL) { @@ -1397,7 +1397,7 @@ struct component_terminate_callback_data *component_terminate_callback_data; component_terminate_callback_data = data; - dprintf ("Lib component terminate callback response, error: %d", error); + my_dprintf ("Lib component terminate callback response, error: %d", error); amf_comp_healthcheck_deactivate (component_terminate_callback_data->comp); escalation_policy_restart (component_terminate_callback_data->comp); return 1; @@ -1442,7 +1442,7 @@ switch (interface) { case AMF_RESPONSE_CSISETCALLBACK: { struct amf_csi_assignment *csi_assignment = data; - dprintf ("CSI '%s' set callback response from '%s', error: %d", + my_dprintf ("CSI '%s' set callback response from '%s', error: %d", csi_assignment->csi->name.value, csi_assignment->comp->name.value, error); comp = csi_assignment->comp; @@ -1459,7 +1459,7 @@ } case AMF_RESPONSE_CSIREMOVECALLBACK: { struct amf_csi_assignment *csi_assignment = data; - dprintf ("Lib csi '%s' remove callback response from '%s', error: %d", + my_dprintf ("Lib csi '%s' remove callback response from '%s', error: %d", csi_assignment->csi->name.value, csi_assignment->comp->name.value, error); comp = csi_assignment->comp; @@ -1476,7 +1476,7 @@ } case AMF_RESPONSE_COMPONENTTERMINATECALLBACK: { struct component_terminate_callback_data *callback_data = data; - dprintf ("Lib comp '%s' terminate callback response, error: %d", + my_dprintf ("Lib comp '%s' terminate callback response, error: %d", callback_data->comp->name.value, error); comp_presence_state_set (callback_data->comp, SA_AMF_PRESENCE_UNINSTANTIATED); @@ -1521,7 +1521,7 @@ */ void amf_comp_terminate (struct amf_comp *comp) { - dprintf ("comp terminate '%s'\n", getSaNameT (&comp->name)); + my_dprintf ("comp terminate '%s'\n", getSaNameT (&comp->name)); amf_comp_healthcheck_stop (comp, NULL); comp_presence_state_set (comp, SA_AMF_PRESENCE_TERMINATING); @@ -1540,7 +1540,7 @@ */ void amf_comp_restart (struct amf_comp *comp) { - dprintf ("comp restart '%s'\n", getSaNameT (&comp->name)); + my_dprintf ("comp restart '%s'\n", getSaNameT (&comp->name)); comp_presence_state_set (comp, SA_AMF_PRESENCE_RESTARTING); comp->saAmfCompRestartCount += 1; amf_comp_healthcheck_stop (comp, NULL); @@ -1565,7 +1565,7 @@ assert (comp != NULL && csi_name != NULL && ha_state != NULL); - dprintf ("comp ha state get from comp '%s' CSI '%s'\n", + my_dprintf ("comp ha state get from comp '%s' CSI '%s'\n", getSaNameT (&comp->name), csi_name->value); assignment = csi_assignment_find_in (comp, csi_name); @@ -1593,7 +1593,7 @@ struct amf_healthcheck *healthcheck; SaAisErrorT error = SA_AIS_OK; - dprintf ("Healthcheckconfirm: '%s', key '%s'", + my_dprintf ("Healthcheckconfirm: '%s', key '%s'", comp->name.value, healthcheckKey->key); healthcheck = amf_comp_find_healthcheck (comp, healthcheckKey); --- exec/amfsg.c +++ exec/amfsg.c @@ -173,13 +173,13 @@ if (si->assigned_sis->su == su) { si_assignment = si->assigned_sis; si->assigned_sis = si_assignment->next; - dprintf ("first"); + my_dprintf ("first"); } else { si_assignment = si->assigned_sis->next; si->assigned_sis->next = NULL; - dprintf ("second"); + my_dprintf ("second"); } - dprintf ("%p, %d, %d", + my_dprintf ("%p, %d, %d", si_assignment, si_assignment->name.length, si->assigned_sis->name.length); assert (si_assignment != NULL); @@ -309,7 +309,7 @@ sg->avail_state = SG_AC_Idle; amf_application_sg_assigned (sg->application, sg); } else { - dprintf ("%d, %d", si_assignment_cnt, confirmed_assignments); + my_dprintf ("%d, %d", si_assignment_cnt, confirmed_assignments); } break; case SG_AC_AssigningStandBy: @@ -326,7 +326,7 @@ break; } default: - dprintf ("%d, %d, %d", sg->avail_state, si_assignment_cnt, + my_dprintf ("%d, %d, %d", sg->avail_state, si_assignment_cnt, confirmed_assignments); amf_runtime_attributes_print (amf_cluster); assert (0); @@ -463,7 +463,7 @@ } if (total_assigned == 0) { - dprintf ("Info: No SIs assigned!"); + my_dprintf ("Info: No SIs assigned!"); } } @@ -513,7 +513,7 @@ su = su->next; } if (total_assigned == 0) { - dprintf ("Info: No SIs assigned!"); + my_dprintf ("Info: No SIs assigned!"); } } @@ -594,14 +594,14 @@ * to assign based upon reduction procedure */ if ((inservice_count - active_sus_needed) < 0) { - dprintf ("assignment VI - partial assignment with SIs drop outs\n"); + my_dprintf ("assignment VI - partial assignment with SIs drop outs\n"); su_active_assign = active_sus_needed; su_standby_assign = 0; su_spare_assign = 0; } else if ((inservice_count - active_sus_needed - standby_sus_needed) < 0) { - dprintf ("assignment V - partial assignment with reduction " + my_dprintf ("assignment V - partial assignment with reduction " "of standby units\n"); su_active_assign = active_sus_needed; @@ -615,7 +615,7 @@ if ((sg->saAmfSGMaxStandbySIsperSUs * units_for_standby) <= sg_si_count_get (sg)) { - dprintf ("IV: full assignment with reduction of active service units\n"); + my_dprintf ("IV: full assignment with reduction of active service units\n"); su_active_assign = inservice_count - standby_sus_needed; su_standby_assign = standby_sus_needed; su_spare_assign = 0; @@ -623,27 +623,27 @@ if ((sg->saAmfSGMaxActiveSIsperSUs * units_for_active) <= sg_si_count_get (sg)) { - dprintf ("III: full assignment with reduction of standby " + my_dprintf ("III: full assignment with reduction of standby " "service units\n"); su_active_assign = sg->saAmfSGNumPrefActiveSUs; su_standby_assign = units_for_standby; su_spare_assign = 0; } else if (ii_spare == 0) { - dprintf ("II: full assignment with spare reduction\n"); + my_dprintf ("II: full assignment with spare reduction\n"); su_active_assign = sg->saAmfSGNumPrefActiveSUs; su_standby_assign = sg->saAmfSGNumPrefStandbySUs; su_spare_assign = 0; } else { - dprintf ("I: full assignment with spares\n"); + my_dprintf ("I: full assignment with spares\n"); su_active_assign = sg->saAmfSGNumPrefActiveSUs; su_standby_assign = sg->saAmfSGNumPrefStandbySUs; su_spare_assign = ii_spare; } - dprintf ("(inservice=%d) (assigning active=%d) (assigning standby=%d)" + my_dprintf ("(inservice=%d) (assigning active=%d) (assigning standby=%d)" " (assigning spares=%d)\n", inservice_count, su_active_assign, su_standby_assign, su_spare_assign); sg_assign_nm_active (sg, su_active_assign); --- exec/amfsu.c +++ exec/amfsu.c @@ -201,7 +201,7 @@ { struct amf_csi_assignment *csi_assignment; - dprintf (" Creating CSI '%s' to comp '%s' with hastate %s\n", + my_dprintf (" Creating CSI '%s' to comp '%s' with hastate %s\n", getSaNameT (&csi->name), getSaNameT (&comp->name), amf_ha_state (ha_state)); @@ -274,7 +274,7 @@ { struct amf_si_assignment *si_assignment; - dprintf ("Creating SI '%s' to SU '%s' with hastate %s\n", + my_dprintf ("Creating SI '%s' to SU '%s' with hastate %s\n", getSaNameT (&si->name), getSaNameT (&su->name), amf_ha_state (ha_state)); @@ -425,7 +425,7 @@ } break; default: - dprintf ("state %d", su->restart_control_state); + my_dprintf ("state %d", su->restart_control_state); assert (0); } break; --- exec/print.h +++ exec/print.h @@ -128,7 +128,7 @@ } \ } while(0) -#define dprintf(format, args...) do { \ +#define my_dprintf(format, args...) do { \ if (LOG_LEVEL_DEBUG <= loggers[logger_identifier].level) { \ internal_log_printf2 (__FILE__, __LINE__, LOG_LEVEL_DEBUG, logger_identifier, format, ##args); \ } \ --- test/subscription.c +++ test/subscription.c @@ -218,7 +218,7 @@ return time_buf; } -#define dprintf(format, ...) \ +#define my_dprintf(format, ...) \ { \ if (did_dot) { \ printf("\n"); \ @@ -246,13 +246,13 @@ #endif if (!quiet) - dprintf("event_callback called\n"); + my_dprintf("event_callback called\n"); if (!quiet) - dprintf("sub ID: %x\n", subscription_id); + my_dprintf("sub ID: %x\n", subscription_id); if (!quiet) - dprintf("event_handle %llx\n", (unsigned long long)event_handle); + my_dprintf("event_handle %llx\n", (unsigned long long)event_handle); if (!quiet) - dprintf("event data size %llu\n", (unsigned long long)event_data_size); + my_dprintf("event data size %llu\n", (unsigned long long)event_data_size); evt_pat_get_array.patterns[0].patternSize = PAT_SIZE; evt_pat_get_array.patterns[1].patternSize = PAT_SIZE; @@ -269,35 +269,35 @@ ); if (result != SA_AIS_OK) { get_sa_error(result, result_buf, result_buf_len); - dprintf("event get attr result(2): %s\n", result_buf); + my_dprintf("event get attr result(2): %s\n", result_buf); goto evt_free; } if (!quiet) { - dprintf("pattern array count: %llu\n", + my_dprintf("pattern array count: %llu\n", (unsigned long long)evt_pat_get_array.patternsNumber); for (i = 0; i < evt_pat_get_array.patternsNumber; i++) { - dprintf( "pattern %d =\"%s\"\n", i, + my_dprintf( "pattern %d =\"%s\"\n", i, evt_pat_get_array.patterns[i].pattern); } - dprintf("priority: 0x%x\n", priority); - dprintf("retention: 0x%llx\n", (unsigned long long)retention_time); - dprintf("publisher name content: \"%s\"\n", + my_dprintf("priority: 0x%x\n", priority); + my_dprintf("retention: 0x%llx\n", (unsigned long long)retention_time); + my_dprintf("publisher name content: \"%s\"\n", publisher_name.value); } if (event_id == SA_EVT_EVENTID_LOST) { - dprintf("*** Events have been dropped at %s", + my_dprintf("*** Events have been dropped at %s", ais_time_str(publish_time)); if ((evt_pat_get_array.patternsNumber == 0)|| (strcmp((char *)evt_pat_get_array.patterns[0].pattern, SA_EVT_LOST_EVENT) != 0)) { - dprintf("*** Received SA_EVT_EVENTID_LOST but pattern is wrong: %s\n", + my_dprintf("*** Received SA_EVT_EVENTID_LOST but pattern is wrong: %s\n", evt_pat_get_array.patterns[0].pattern); } } if (quiet < 2) { - dprintf("event id: 0x%016llx\n", (unsigned long long)event_id); + my_dprintf("event id: 0x%016llx\n", (unsigned long long)event_id); } if (quiet == 2) { if ((++evt_count % EVT_FREQ) == 0) { @@ -319,7 +319,7 @@ if ((last_event_id[idx] >> 32) == (event_id >> 32)) { last_event_id[idx]++; if (last_event_id[idx] != event_id) { - dprintf("*** expected %016llx got %016llx event_id\n", + my_dprintf("*** expected %016llx got %016llx event_id\n", (unsigned long long)last_event_id[idx], (unsigned long long)event_id); last_event_id[idx] = event_id; @@ -329,13 +329,13 @@ } } if (idx == MAX_NODES) { - dprintf("*** Too many nodes in cluster\n"); + my_dprintf("*** Too many nodes in cluster\n"); exit(1); } #endif if (event_data_size != user_data_size) { - dprintf("unexpected data size: e=%d, a=%llu\n", + my_dprintf("unexpected data size: e=%d, a=%llu\n", user_data_size, (unsigned long long)event_data_size); goto evt_free; } @@ -345,21 +345,21 @@ &received_size); if (result != SA_AIS_OK) { get_sa_error(result, result_buf, result_buf_len); - dprintf("event get data result: %s\n", result_buf); + my_dprintf("event get data result: %s\n", result_buf); goto evt_free; } if (received_size != event_data_size) { - dprintf("event data mismatch e=%llu, a=%llu\n", + my_dprintf("event data mismatch e=%llu, a=%llu\n", (unsigned long long)event_data_size, (unsigned long long)received_size); goto evt_free; } if (memcmp(user_data, event_data, user_data_size) != 0 ) { - dprintf("event data doesn't match specified file data\n"); + my_dprintf("event data doesn't match specified file data\n"); goto evt_free; } if (!quiet) { - dprintf("Received %d bytes of data OK\n", + my_dprintf("Received %d bytes of data OK\n", user_data_size); } @@ -367,7 +367,7 @@ result = saEvtEventFree(event_handle); if (!quiet) { get_sa_error(result, result_buf, result_buf_len); - dprintf("event free result: %s\n", result_buf); + my_dprintf("event free result: %s\n", result_buf); } }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor