Commit 44eaafca authored by Alessandro Rubini's avatar Alessandro Rubini

userspace: fix TRACE macro and its users

Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 5181075e
......@@ -9,7 +9,7 @@
#define TRACE_FATAL 3
#ifdef DEBUG
#define TRACE(...) trace_printf(__FILE__, __LINE__, __VA_ARGS__);
#define TRACE(...) trace_printf(__FILE__, __LINE__, __VA_ARGS__)
#else
#define TRACE(...)
#endif
......
......@@ -181,7 +181,7 @@ int hal_init()
if(!hal_config_get_string("global.sfp_database_path", sfp_db_path, sizeof(sfp_db_path)))
{
if(shw_sfp_read_db(sfp_db_path) < 0) {
TRACE(TRACE_ERROR, "Can't read SFP database (%s)", sfp_db_path)
TRACE(TRACE_ERROR, "Can't read SFP database (%s)", sfp_db_path);
} else {
TRACE(TRACE_INFO, "Loaded SFP database (%s)", sfp_db_path);
}
......
......@@ -480,7 +480,7 @@ static void on_insert_sfp(hal_port_state_t *p)
{
struct shw_sfp_header shdr;
if(shw_sfp_read_verify_header(p->hw_index, &shdr) < 0)
TRACE(TRACE_ERROR, "Failed to read SFP configuration header")
TRACE(TRACE_ERROR, "Failed to read SFP configuration header");
else {
struct shw_sfp_caldata *cdata;
TRACE(TRACE_INFO, "SFP Info: Manufacturer: %.16s P/N: %.16s, S/N: %.16s", shdr.vendor_name, shdr.vendor_pn, shdr.vendor_serial);
......
......@@ -167,7 +167,7 @@ static void rtu_update_ports_state()
if (port_state[i].is_up && !link_up) {
TRACE(TRACE_INFO,
"Port %s went down, removing corresponding entries...",
port_state[i].if_name)
port_state[i].if_name);
rtu_fd_clear_entries_for_port(port_state[i].
hw_index);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment