diff --git a/core/msg.c b/core/msg.c index 123ba95cb5..14945325b6 100644 --- a/core/msg.c +++ b/core/msg.c @@ -94,17 +94,17 @@ static int _msg_send(msg_t *m, kernel_pid_t target_pid, bool block, unsigned sta } DEBUG("msg_send() %s:%i: Sending from %" PRIkernel_pid " to %" PRIkernel_pid - ". block=%i src->state=%i target->state=%i\n", __FILE__, __LINE__, - sched_active_pid, target_pid, + ". block=%i src->state=%i target->state=%i\n", RIOT_FILE_RELATIVE, + __LINE__, sched_active_pid, target_pid, block, sched_active_thread->status, target->status); if (target->status != STATUS_RECEIVE_BLOCKED) { DEBUG("msg_send() %s:%i: Target %" PRIkernel_pid " is not RECEIVE_BLOCKED.\n", - __FILE__, __LINE__, target_pid); + RIOT_FILE_RELATIVE, __LINE__, target_pid); if (queue_msg(target, m)) { DEBUG("msg_send() %s:%i: Target %" PRIkernel_pid - " has a msg_queue. Queueing message.\n", __FILE__, + " has a msg_queue. Queueing message.\n", RIOT_FILE_RELATIVE, __LINE__, target_pid); restoreIRQ(state); if (sched_active_thread->status == STATUS_REPLY_BLOCKED) { diff --git a/cpu/lpc2387/lpc2387-adc.c b/cpu/lpc2387/lpc2387-adc.c index 75e8514bfd..169fb42865 100644 --- a/cpu/lpc2387/lpc2387-adc.c +++ b/cpu/lpc2387/lpc2387-adc.c @@ -134,7 +134,7 @@ uint16_t adc_read(uint8_t channel) } adc_data = (regVal >> 6) & 0x3FF; - DEBUG("%s, %d: %lu\n", __FILE__, __LINE__, t1); - DEBUG("%s, %d: %lu\n", __FILE__, __LINE__, t2); + DEBUG("%s, %d: %lu\n", RIOT_FILE_RELATIVE, __LINE__, t1); + DEBUG("%s, %d: %lu\n", RIOT_FILE_RELATIVE, __LINE__, t2); return (uint16_t) adc_data; /* return A/D conversion value */ } diff --git a/cpu/lpc2387/mci/lpc2387-mci.c b/cpu/lpc2387/mci/lpc2387-mci.c index 0d1fa524c9..b358b8e42b 100644 --- a/cpu/lpc2387/mci/lpc2387-mci.c +++ b/cpu/lpc2387/mci/lpc2387-mci.c @@ -558,7 +558,7 @@ DSTATUS MCI_initialize(void) do { /* Wait while card is busy state (use ACMD41 with HCS bit) */ /* This loop will take a time. Insert wai_tsk(1) here for multitask envilonment. */ if (xtimer_now() > start + 1000000/*!Timer[0]*/) { - DEBUG("%s, %d: Timeout #1\n", __FILE__, __LINE__); + DEBUG("%s, %d: Timeout #1\n", RIOT_FILE_RELATIVE, __LINE__); goto di_fail; } } @@ -579,12 +579,12 @@ DSTATUS MCI_initialize(void) } do { /* Wait while card is busy state (use ACMD41 or CMD1) */ - DEBUG("%s, %d: %lX\n", __FILE__, __LINE__, resp[0]); + DEBUG("%s, %d: %lX\n", RIOT_FILE_RELATIVE, __LINE__, resp[0]); /* This loop will take a time. Insert wai_tsk(1) here for multitask envilonment. */ if (xtimer_now() > start + 1000000/*!Timer[0]*/) { DEBUG("now: %lu, started at: %lu\n", xtimer_now(), start); - DEBUG("%s, %d: Timeout #2\n", __FILE__, __LINE__); + DEBUG("%s, %d: Timeout #2\n", RIOT_FILE_RELATIVE, __LINE__); goto di_fail; } } @@ -597,7 +597,8 @@ DSTATUS MCI_initialize(void) /*---- Card is 'ready' state ----*/ if (!send_cmd(CMD2, 0, 2, resp)) { - DEBUG("%s, %d: Failed entering ident state", __FILE__, __LINE__); + DEBUG("%s, %d: Failed entering ident state", RIOT_FILE_RELATIVE, + __LINE__); goto di_fail; /* Enter ident state */ } @@ -609,7 +610,7 @@ DSTATUS MCI_initialize(void) if (ty & CT_SDC) { /* SDC: Get generated RCA and save it */ if (!send_cmd(CMD3, 0, 1, resp)) { - DEBUG("%s, %d: Failed generating RCA\n", __FILE__, __LINE__); + DEBUG("%s, %d: Failed generating RCA\n", RIOT_FILE_RELATIVE, __LINE__); goto di_fail; } diff --git a/cpu/msp430-common/include/assert.h b/cpu/msp430-common/include/assert.h index 81bc8ec53c..eb2219d948 100644 --- a/cpu/msp430-common/include/assert.h +++ b/cpu/msp430-common/include/assert.h @@ -51,8 +51,8 @@ extern "C" { #ifndef NDEBUG # define assert(assertion) \ if (!(assertion)) { \ - printf("%s:%d: %s: Assertion '%s' failed", __FILE__, __LINE__, \ - ASSERT_FUNC, #assertion); \ + printf("%s:%d: %s: Assertion '%s' failed", RIOT_FILE_RELATIVE, \ + __LINE__, ASSERT_FUNC, #assertion); \ abort(); \ } #else diff --git a/cpu/stellaris_common/include/stellaris_periph/debug.h b/cpu/stellaris_common/include/stellaris_periph/debug.h index 19b36a8c9f..cce40a449b 100644 --- a/cpu/stellaris_common/include/stellaris_periph/debug.h +++ b/cpu/stellaris_common/include/stellaris_periph/debug.h @@ -62,7 +62,7 @@ extern void __error__(char *pcFilename, unsigned long ulLine); #define ASSERT(expr) { \ if(!(expr)) \ { \ - __error__(__FILE__, __LINE__); \ + __error__(RIOT_FILE_RELATIVE, __LINE__); \ } \ } #else diff --git a/sys/crypto/3des.c b/sys/crypto/3des.c index 6a7af54b02..beff5644dc 100644 --- a/sys/crypto/3des.c +++ b/sys/crypto/3des.c @@ -321,7 +321,7 @@ int tripledes_decrypt(const cipher_context_t *context, const uint8_t *crypt, uin if (!key) { DEBUG("%s:%d in %s: [ERROR] Could NOT malloc space for the des3_key_s struct.\r\n", - __FILE__, __LINE__, DEBUG_FUNC); + RIOT_FILE_RELATIVE, __LINE__, DEBUG_FUNC); return -1; } @@ -330,7 +330,7 @@ int tripledes_decrypt(const cipher_context_t *context, const uint8_t *crypt, uin if (res < 0) { DEBUG("%s:%d in %s: [ERROR] des3_key_setup failed with Code %i\r\n", - __FILE__, __LINE__, DEBUG_FUNC, res); + RIOT_FILE_RELATIVE, __LINE__, DEBUG_FUNC, res); free(key); return -2; } diff --git a/sys/include/embUnit/AssertImpl.h b/sys/include/embUnit/AssertImpl.h index 2694db82cd..ca644b94a1 100644 --- a/sys/include/embUnit/AssertImpl.h +++ b/sys/include/embUnit/AssertImpl.h @@ -49,7 +49,7 @@ void assertImplementationCStr(const char *expected,const char *actual, long line __typeof__(expected_) ____expected__ = expected_; \ __typeof__(actual_) ____actual__ = actual_; \ if (stdimpl_strcmp(____expected__, ____actual__) != 0) { \ - assertImplementationCStr(____expected__, ____actual__, __LINE__, __FILE__); \ + assertImplementationCStr(____expected__, ____actual__, __LINE__, RIOT_FILE_RELATIVE); \ return; \ } \ } while (0) @@ -59,7 +59,8 @@ void assertImplementationCStr(const char *expected,const char *actual, long line long long ____expected__ = (long long) (expected_); \ long long ____actual__ = (long long) (actual_); \ if (____expected__ != ____actual__) { \ - assertImplementationLongLong(____expected__, ____actual__, __LINE__, __FILE__); \ + assertImplementationLongLong(____expected__, ____actual__, \ + __LINE__, RIOT_FILE_RELATIVE); \ return; \ } \ } while (0) @@ -91,7 +92,7 @@ void assertImplementationCStr(const char *expected,const char *actual, long line #define TEST_FAIL(message) \ do { \ - addFailure((message), __LINE__, __FILE__); \ + addFailure((message), __LINE__, RIOT_FILE_RELATIVE); \ return; \ } while (0) diff --git a/sys/net/routing/nhdp/iib_table.c b/sys/net/routing/nhdp/iib_table.c index bc746b9bdb..22769eace9 100644 --- a/sys/net/routing/nhdp/iib_table.c +++ b/sys/net/routing/nhdp/iib_table.c @@ -195,7 +195,7 @@ void iib_fill_wr_addresses(kernel_pid_t if_pid, struct rfc5444_writer *wr) default: /* Should not happen */ DEBUG("%s:%d in %s: [WARNING] Unknown link tuple status\n", - __FILE__, __LINE__, DEBUG_FUNC); + RIOT_FILE_RELATIVE, __LINE__, DEBUG_FUNC); break; } } @@ -261,8 +261,9 @@ void iib_process_metric_msg(iib_link_set_entry_t *ls_entry, uint64_t int_time) /* NHDP_METRIC is not set properly */ (void)ls_entry; (void)int_time; - DEBUG("%s:%d in %s: [WARNING] Unknown NHDP_METRIC setting\n", __FILE__, - __LINE__, DEBUG_FUNC); #endif + DEBUG("%s:%d in %s: [WARNING] Unknown NHDP_METRIC setting\n", + RIOT_FILE_RELATIVE, __LINE__, DEBUG_FUNC); +#endif } void iib_process_metric_pckt(iib_link_set_entry_t *ls_entry, uint32_t metric_out, uint16_t seq_no) @@ -333,8 +334,9 @@ void iib_process_metric_pckt(iib_link_set_entry_t *ls_entry, uint32_t metric_out (void)ls_entry; (void)metric_out; (void)seq_no; - DEBUG("%s:%d in %s: [WARNING] Unknown NHDP_METRIC setting\n", __FILE__, - __LINE__, DEBUG_FUNC); #endif + DEBUG("%s:%d in %s: [WARNING] Unknown NHDP_METRIC setting\n", + RIOT_FILE_RELATIVE, __LINE__, DEBUG_FUNC); +#endif } void iib_process_metric_refresh(void) @@ -345,8 +347,9 @@ void iib_process_metric_refresh(void) dat_metric_refresh(); #else /* NHDP_METRIC is not set properly */ - DEBUG("%s:%d in %s: [WARNING] Unknown NHDP_METRIC setting\n", __FILE__, - __LINE__, DEBUG_FUNC); #endif + DEBUG("%s:%d in %s: [WARNING] Unknown NHDP_METRIC setting\n", + RIOT_FILE_RELATIVE, __LINE__, DEBUG_FUNC); +#endif } diff --git a/sys/trickle/trickle.c b/sys/trickle/trickle.c index 6ab4a85c4d..7877c6287b 100644 --- a/sys/trickle/trickle.c +++ b/sys/trickle/trickle.c @@ -37,12 +37,13 @@ void trickle_interval(trickle_t *trickle) DEBUG("TRICKLE new Interval %" PRIu32 "\n", trickle->I); if (trickle->I == 0) { - DEBUG("%s:%d in %s: [WARNING] Interval was 0\n", __FILE__, __LINE__, - DEBUG_FUNC); + DEBUG("%s:%d in %s: [WARNING] Interval was 0\n", RIOT_FILE_RELATIVE, + __LINE__, DEBUG_FUNC); if (trickle->Imax == 0) { - DEBUG("%s:%d in %s: [WARNING] Imax == 0\n", __FILE__, __LINE__, - DEBUG_FUNC); } + DEBUG("%s:%d in %s: [WARNING] Imax == 0\n", RIOT_FILE_RELATIVE, + __LINE__, DEBUG_FUNC); + } trickle->I = (trickle->Imin << trickle->Imax); }