From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-bk0-f47.google.com (mail-bk0-f47.google.com [209.85.214.47]) by dpdk.org (Postfix) with ESMTP id 12AA41F3 for ; Mon, 30 Sep 2013 10:43:09 +0200 (CEST) Received: by mail-bk0-f47.google.com with SMTP id mx12so1845254bkb.20 for ; Mon, 30 Sep 2013 01:43:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=Dgd3hWGXxkO3stIWq/f4C/Z9Yn5yioYaz2h6I/1luQk=; b=WwiemxTQ/zIHZ6ORRsbxk8AypvYwUyFq8Isr1ZFaFxIYeIVLNgRp5ZKQc/jqBDT2aJ Ghfpv4xwGxL/vBluD/6kObFX+JAD5ZJx27P7dilI5kOvdUGvulnCtywGOqjUX/aOOvgT ab9c5zFGNd2qgOdvOe8wPMXsO9Bx8RvFpXmOTP3f9JhA+YSstZXXZjMWOc14JXIaEvBR zokdw6UraZJQaUvFFMyNKF1G7XjeIm2OpHjwLvh/gFsVynPWw5x00T2yZiaNGAqI1m0J dsaiaSoorpO0M4V7eUIT7hLLOi+2bgd9f1tMX7zWiNX3D8F97x2EFx7u8/x5ch1M3+1t VoNA== X-Gm-Message-State: ALoCoQkQTobCkBjXkyZeqpTjhfby1aop2rTcaJJv/+54517i9bC5L7fF4nR4/xyhRw42RA/5VMEq X-Received: by 10.205.78.5 with SMTP id zk5mr5140167bkb.25.1380530631793; Mon, 30 Sep 2013 01:43:51 -0700 (PDT) Received: from 6wind.com (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id on10sm11556929bkb.13.1969.12.31.16.00.00 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 30 Sep 2013 01:43:51 -0700 (PDT) Received: by 6wind.com (sSMTP sendmail emulation); Mon, 30 Sep 2013 10:43:46 +0200 From: Thomas Monjalon To: dev@dpdk.org Date: Mon, 30 Sep 2013 10:43:46 +0200 Message-Id: <1380530626-19733-1-git-send-email-thomas.monjalon@6wind.com> X-Mailer: git-send-email 1.7.10.4 Subject: [dpdk-dev] [PATCH] log: remove app path from syslog id X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Sep 2013 08:43:10 -0000 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 --- 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 6086ca4..aa86b9c 100644 --- a/lib/librte_eal/linuxapp/eal/eal.c +++ b/lib/librte_eal/linuxapp/eal/eal.c @@ -829,10 +829,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) @@ -884,7 +888,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) -- 1.7.10.4