From d8a2bc71dfc2a4530dd80f0b5a962e5f795ad3f6 Mon Sep 17 00:00:00 2001 From: Thomas Monjalon Date: Mon, 16 Sep 2013 12:36:20 +0200 Subject: [PATCH] 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 Acked-by: Stephen Hemminger --- lib/librte_eal/linuxapp/eal/eal.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c index d572bda457..76c2f3cc07 100644 --- a/lib/librte_eal/linuxapp/eal/eal.c +++ b/lib/librte_eal/linuxapp/eal/eal.c @@ -931,10 +931,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) @@ -1003,7 +1007,7 @@ rte_eal_init(int argc, char **argv) rte_panic("Cannot init IVSHMEM objects\n"); #endif - 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) -- 2.20.1