summaryrefslogtreecommitdiff
path: root/lib/librte_eal
diff options
context:
space:
mode:
authorThomas Monjalon <thomas.monjalon@6wind.com>2013-09-16 14:36:20 +0200
committerThomas Monjalon <thomas.monjalon@6wind.com>2013-11-24 21:31:37 +0100
commit69d3db08f363b41484fb9ac05814ab5daa97558f (patch)
treea19078fa3f727e6b2c6132f7bd98c4f86a58974b /lib/librte_eal
parent93e6537b79cac387e20a80f2188c6a7664257b2a (diff)
downloaddpdk-69d3db08f363b41484fb9ac05814ab5daa97558f.zip
dpdk-69d3db08f363b41484fb9ac05814ab5daa97558f.tar.gz
dpdk-69d3db08f363b41484fb9ac05814ab5daa97558f.tar.xz
log: remove app path from syslog id
This reverts commit "log: get full path as syslog id" (494a02537f1) and restore the original patch from Stephen Hemminger (04210699eee). Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Diffstat (limited to 'lib/librte_eal')
-rw-r--r--lib/librte_eal/linuxapp/eal/eal.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c
index ba464b7..3c5f19a 100644
--- a/lib/librte_eal/linuxapp/eal/eal.c
+++ b/lib/librte_eal/linuxapp/eal/eal.c
@@ -875,10 +875,14 @@ rte_eal_init(int argc, char **argv)
pthread_t thread_id;
static rte_atomic32_t run_once = RTE_ATOMIC32_INIT(0);
struct shared_driver *solib = NULL;
+ const char *logid;
if (!rte_atomic32_test_and_set(&run_once))
return -1;
+ logid = strrchr(argv[0], '/');
+ logid = strdup(logid ? logid + 1: argv[0]);
+
thread_id = pthread_self();
if (rte_eal_log_early_init() < 0)
@@ -933,7 +937,7 @@ rte_eal_init(int argc, char **argv)
if (rte_eal_tailqs_init() < 0)
rte_panic("Cannot init tail queues for objects\n");
- if (rte_eal_log_init(argv[0], internal_config.syslog_facility) < 0)
+ if (rte_eal_log_init(logid, internal_config.syslog_facility) < 0)
rte_panic("Cannot init logs\n");
if (rte_eal_alarm_init() < 0)