Re: [PATCH rdma-core 16/21] srp_daemon: Do not use LOG_PERROR

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2017-07-25 at 17:08 -0600, Jason Gunthorpe wrote:
> On Tue, Jul 25, 2017 at 06:09:46PM +0000, Bart Van Assche wrote:
> > That sounds fine to me.
> 
> Okay, I dropped the perror patch and replaced it with these two:
> 
> https://github.com/linux-rdma/rdma-core/pull/172/commits/f1f2e1b1bc3e90abdacdd06b3afe7ca4b107f9e3
> https://github.com/linux-rdma/rdma-core/pull/172/commits/588c60a33ac5b846fee039a1cb8e622681fb980e
> 
> To implement a --systemd option to control the log behavior.

Hello Jason,

Since both is_systemd() and get_config() ignore the local variable opt_idx,
how about passing NULL as the fifth argument to getopt_long()?

>From the getopt_long() man page: "The variable optind is the index of the
next element to be processed in argv. The system initializes this value to
1. The caller can reset it to 1 to restart scanning of the same argv, or
when scanning a new argument vector."

Since getopt_long() is called twice by srp_daemon, shouldn't get_config()
reset the optind global variable before calling getopt_long()?

Thanks,

Bart.--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux