mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
tests: aux.sh using grep -c
Consider using grep -c instead of grep|wc -l.
This commit is contained in:
parent
b16ca76260
commit
4f63b7e9c1
@ -423,7 +423,7 @@ teardown_devs_prefixed() {
|
||||
if test -f REMOVE_FAILED; then
|
||||
local num_devs
|
||||
local num_remaining_devs=999
|
||||
while num_devs=$(dm_table | grep "$prefix" | wc -l) && \
|
||||
while num_devs=$(dm_table | grep -c "$prefix") && \
|
||||
test "$num_devs" -lt "$num_remaining_devs" -a "$num_devs" -ne 0; do
|
||||
test "$stray" -eq 0 || echo "Removing $num_devs stray mapped devices with names beginning with $prefix: "
|
||||
# HACK: sort also by minors - so we try to close 'possibly later' created device first
|
||||
|
Loading…
Reference in New Issue
Block a user