mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
tests: fix check sysfs
Commit 810f856c24
missed to move
assign of P after setting maj & min.
This commit is contained in:
parent
edede1d20f
commit
ca87674ea4
@ -422,10 +422,11 @@ sysfs() {
|
||||
# read maj min and also convert hex to decimal
|
||||
local maj
|
||||
local min
|
||||
local P="/sys/dev/block/$maj:$min/$2"
|
||||
local P
|
||||
local val
|
||||
maj=$(($(stat -L --printf=0x%t "$1")))
|
||||
min=$(($(stat -L --printf=0x%T "$1")))
|
||||
P="/sys/dev/block/$maj:$min/$2"
|
||||
val=$(< "$P") || return 0 # no sysfs ?
|
||||
test "$val" -eq "$3" || \
|
||||
die "$1: $P = $val differs from expected value $3!"
|
||||
|
Loading…
Reference in New Issue
Block a user