From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id B99308D86 for ; Wed, 22 Jun 2016 10:02:14 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP; 22 Jun 2016 01:02:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,509,1459839600"; d="scan'208";a="1002856721" Received: from irsmsx151.ger.corp.intel.com ([163.33.192.59]) by orsmga002.jf.intel.com with ESMTP; 22 Jun 2016 01:01:56 -0700 Received: from irsmsx109.ger.corp.intel.com ([169.254.13.193]) by IRSMSX151.ger.corp.intel.com ([169.254.4.151]) with mapi id 14.03.0248.002; Wed, 22 Jun 2016 09:01:54 +0100 From: "Pattan, Reshma" To: "Yigit, Ferruh" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH 1/3] pdump: check getenv return value Thread-Index: AQHRy9AmTaeWhn1ylkWR3zlJH6wvMZ/0Ey6AgAENM0A= Date: Wed, 22 Jun 2016 08:01:53 +0000 Message-ID: <3AEA2BF9852C6F48A459DA490692831F01050A92@IRSMSX109.ger.corp.intel.com> References: <1466522285-15023-1-git-send-email-reshma.pattan@intel.com> <1466522285-15023-2-git-send-email-reshma.pattan@intel.com> <5769719F.4060803@intel.com> In-Reply-To: <5769719F.4060803@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiOWRiMDI3MTYtZWY3Ny00OTMxLTg3NWQtYmQ2ZDNlMDc1MzU5IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6Ik1IV0xOd1pzQzFISzR5MmVFK3Z3YmluaERYb1VsdDdaRXhHekFTV0tDWmM9In0= x-ctpclassification: CTP_IC x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 1/3] pdump: check getenv return value 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: Wed, 22 Jun 2016 08:02:15 -0000 Hi Ferruh, > -----Original Message----- > From: Yigit, Ferruh > Sent: Tuesday, June 21, 2016 5:56 PM > To: Pattan, Reshma ; dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH 1/3] pdump: check getenv return value >=20 > On 6/21/2016 4:18 PM, Reshma Pattan wrote: > > dir =3D client_socket_dir; > > else { > > - if (getuid() !=3D 0) > > + if (getuid() !=3D 0) { > > dir =3D getenv(SOCKET_PATH_HOME); > > + if (!dir) { > > + RTE_LOG(ERR, PDUMP, > > + "Failed to get environment variable" > > + "value for %s, %s:%d\n", > > + SOCKET_PATH_HOME, __func__, > __LINE__); > > + return -1; > Instead of failing, does it make sense to fallback to a default path? > Is it possible that sometimes end user doesn't really care where socket c= reated > as long as it created and runs smoothly? >=20 >=20 This is for default path only.=20 Thanks, Reshma