On 11/26/20 11:59 AM, Bart Van Assche wrote:
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:
Sure, will update with V3.
sed 's/[][]//g' /sys/block/"$b"/queue/scheduler
Otherwise this patch looks good to me.
Thanks,
Bart.