mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
fsadm: fix condition when using --getsize64
When blocksize --getsize64 gives empty result we want to fallback to ancient --getsize * --getss calculation (RHBZ #1942486). Reported by: ajschorr@alumni.princeton.edu
This commit is contained in:
parent
9684e82cc4
commit
63c58d2a5d
@ -378,7 +378,7 @@ detect_mounted() {
|
|||||||
detect_device_size() {
|
detect_device_size() {
|
||||||
# check if blockdev supports getsize64
|
# check if blockdev supports getsize64
|
||||||
DEVSIZE=$("$BLOCKDEV" --getsize64 "$VOLUME" 2>"$NULL" || true)
|
DEVSIZE=$("$BLOCKDEV" --getsize64 "$VOLUME" 2>"$NULL" || true)
|
||||||
if test -n "$DEVSIZE" ; then
|
if test -z "$DEVSIZE" ; then
|
||||||
DEVSIZE=$("$BLOCKDEV" --getsize "$VOLUME" || true)
|
DEVSIZE=$("$BLOCKDEV" --getsize "$VOLUME" || true)
|
||||||
test -n "$DEVSIZE" || error "Cannot read size of device \"$VOLUME\"."
|
test -n "$DEVSIZE" || error "Cannot read size of device \"$VOLUME\"."
|
||||||
SSSIZE=$("$BLOCKDEV" --getss "$VOLUME" || true)
|
SSSIZE=$("$BLOCKDEV" --getss "$VOLUME" || true)
|
||||||
|
Loading…
Reference in New Issue
Block a user