to silence the warning like:
SC2166: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
see also
https://pubs.opengroup.org/onlinepubs/
9699919799/utilities/test.html
Signed-off-by: Kefu Chai <kchai@redhat.com>
shift
local devs=$1
shift
+ local dev
IFS=',' read -r -a block_devs <<< "$devs"
for dev in "${block_devs[@]}"; do
- if [ ! -b $dev -o ! -w $dev ]; then
+ if [ ! -b $dev ] || [ ! -w $dev ]; then
echo "All $opt_name must refer to writable block devices"
exit 1
fi