From: Thomas Monjalon Date: Mon, 16 Sep 2013 10:36:20 +0000 (+0200) Subject: log: remove app path from syslog id X-Git-Tag: spdx-start~10959 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=d8a2bc71dfc2;p=dpdk.git 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 --- 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)