[PATCH V2 blktests 3/5] nvmeof-mp/012, srp/012: fix the scheduler list
Bart Van Assche
bvanassche at acm.org
Wed Nov 25 22:59:34 EST 2020
On 11/24/20 11:32 PM, Yi Zhang wrote:
> +# Get block dev scheduler list
> +get_scheduler_list() {
> + local b=$1 p
> + p=/sys/block/"$b"/queue/scheduler
> + if [ -e "$p" ]; then
> + scheds=$(sed 's/[][]//g' /sys/block/"$b"/queue/scheduler)
> + echo "$scheds"
> + else
> + return 1
> + fi
> +}
Can the echo statement and the 'scheds' assignment be left out? This is
what I have in mind:
sed 's/[][]//g' /sys/block/"$b"/queue/scheduler
Otherwise this patch looks good to me.
Thanks,
Bart.
More information about the Linux-nvme
mailing list