From: Michal Sojka Date: Thu, 8 Mar 2012 22:18:17 +0000 (+0100) Subject: fwp: Unify newlines in error messages X-Git-Url: http://rtime.felk.cvut.cz/gitweb/frescor/frsh-forb.git/commitdiff_plain/1098909c9fbbb63f180fe24eb0c9ef51d86d77db fwp: Unify newlines in error messages --- diff --git a/src/fwp/fwp/lib/fwp/fwp_debug.h b/src/fwp/fwp/lib/fwp/fwp_debug.h index cbbe0741..6ceb4728 100644 --- a/src/fwp/fwp/lib/fwp/fwp_debug.h +++ b/src/fwp/fwp/lib/fwp/fwp_debug.h @@ -51,8 +51,8 @@ extern UL_LOG_CUST(ulogd_fwp); -#define FWP_DEBUG(fmt,args...) ul_logdeb("%s: " fmt, __func__ , ##args) -#define FWP_ERROR(fmt,args...) ul_logerr("%s: " fmt, __func__ , ##args) +#define FWP_DEBUG(fmt,args...) ul_logdeb("%s: " fmt "\n", __func__ , ##args) +#define FWP_ERROR(fmt,args...) ul_logerr("%s: " fmt "\n", __func__ , ##args) #endif diff --git a/src/fwp/fwp/lib/fwp/fwp_endpoint.c b/src/fwp/fwp/lib/fwp/fwp_endpoint.c index 6117d6ce..a340d73b 100644 --- a/src/fwp/fwp/lib/fwp/fwp_endpoint.c +++ b/src/fwp/fwp/lib/fwp/fwp_endpoint.c @@ -328,7 +328,7 @@ int fwp_receive_endpoint_create(unsigned int port, } if (listen(fwp_epoint->sockd, fwp_epoint->attr.max_connections)){ - FWP_ERROR("Error on listen call: %s\n", strerror(errno)); + FWP_ERROR("Error on listen call: %s", strerror(errno)); goto err; } @@ -445,7 +445,7 @@ static int fwp_receive_endpoint_accept(struct fwp_endpoint *fwp_epoint) &peer.addrlen); if (csockd < 0) { - FWP_ERROR("Error on accept: %s\n", strerror(errno)); + FWP_ERROR("Error on accept: %s", strerror(errno)); return errno; } diff --git a/src/fwp/fwp/lib/fwp/fwp_utils.c b/src/fwp/fwp/lib/fwp/fwp_utils.c index 69cf356b..7fbb11a7 100644 --- a/src/fwp/fwp/lib/fwp/fwp_utils.c +++ b/src/fwp/fwp/lib/fwp/fwp_utils.c @@ -99,13 +99,13 @@ int fwp_set_rt_prio(int priority) static struct sched_param param; if ((maxpri = sched_get_priority_max(SCHED_FIFO)) == -1) { - FWP_ERROR("sched_get_priority_max call failed: %s\n", + FWP_ERROR("sched_get_priority_max call failed: %s", strerror(errno)); return -1; } if ((minpri = sched_get_priority_min(SCHED_FIFO)) == -1) { - FWP_ERROR("sched_get_priority_min call failed: %s\n", + FWP_ERROR("sched_get_priority_min call failed: %s", strerror(errno)); return -1; } diff --git a/src/fwp/fwp/lib/fwp/fwp_vres.c b/src/fwp/fwp/lib/fwp/fwp_vres.c index 1078bd18..92c15cb6 100644 --- a/src/fwp/fwp/lib/fwp/fwp_vres.c +++ b/src/fwp/fwp/lib/fwp/fwp_vres.c @@ -401,7 +401,7 @@ static void send_queue(struct fwp_vres *vres) can_send = (0 == __consume_budget(vres, msgb->len, false)); if (!can_send) { fwp_msgb_free(msgb); - FWP_ERROR("Cannot send queued packet (budget decreased?)\n"); + FWP_ERROR("Cannot send queued packet (budget decreased?)"); return; } /* If we cannot send the whole queue, the flag will be set