Re: [PATCH 3/5 blktests] nvme: allow target subsys set model

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

 



On 02/11/2020 02:00 PM, Omar Sandoval wrote:
>>
>> >  	mkdir -p "${cfs_path}"
>> >@@ -133,6 +134,9 @@ _create_nvmet_subsystem() {
>> >  		echo ${cntlid_min} > ${cfs_path}/attr_cntlid_min
>> >  		echo ${cntlid_max} > ${cfs_path}/attr_cntlid_max
>> >  	fi
> It's not in the git diff context, but the line above is
>
> 	if [ $# -eq 5 ] && [ -f ${cfs_path}/attr_cntlid_min ]; then
>
> So if we pass 6 arguments, the cntlid arguments are ignored? These
> checks should probably be -ge
>

Yes, -eq forces caller to test cntlid exclusive (without model),
that was the intent here to either test cntlid or model. In this
way caller can pass 0 or "" and that will be ignored. with -ge
then caller has to pass meaningful value and set it properly.

Do we still want to make it to -ge ?




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux