[dpdk-dev] [PATCH 1/3] pdump: check getenv return value

Pattan, Reshma reshma.pattan at intel.com
Wed Jun 22 10:01:53 CEST 2016


Hi Ferruh,

> -----Original Message-----
> From: Yigit, Ferruh
> Sent: Tuesday, June 21, 2016 5:56 PM
> To: Pattan, Reshma <reshma.pattan at intel.com>; dev at dpdk.org
> Subject: Re: [dpdk-dev] [PATCH 1/3] pdump: check getenv return value
> 
> On 6/21/2016 4:18 PM, Reshma Pattan wrote:
> >  		dir = client_socket_dir;
> >  	else {
> > -		if (getuid() != 0)
> > +		if (getuid() != 0) {
> >  			dir = 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 created
> as long as it created and runs smoothly?
> 
> 

This is for default path only. 

Thanks,
Reshma


More information about the dev mailing list