summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2021-03-24 16:11:55 +0100
committerZdenek Kabelac <zkabelac@redhat.com>2021-03-24 16:34:34 +0100
commit63c58d2a5d935cd78c77f3db13a655e68fb36367 (patch)
tree33a934ba874d78181c7bd80fc47fec820701f53d /scripts
parent9684e82cc44cfec66f30b807160c19c06df2a2d8 (diff)
downloadlvm2-63c58d2a5d935cd78c77f3db13a655e68fb36367.tar.gz
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
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/fsadm.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/fsadm.sh b/scripts/fsadm.sh
index d98833c3a..20ae57462 100755
--- a/scripts/fsadm.sh
+++ b/scripts/fsadm.sh
@@ -378,7 +378,7 @@ detect_mounted() {
detect_device_size() {
# check if blockdev supports getsize64
DEVSIZE=$("$BLOCKDEV" --getsize64 "$VOLUME" 2>"$NULL" || true)
- if test -n "$DEVSIZE" ; then
+ if test -z "$DEVSIZE" ; then
DEVSIZE=$("$BLOCKDEV" --getsize "$VOLUME" || true)
test -n "$DEVSIZE" || error "Cannot read size of device \"$VOLUME\"."
SSSIZE=$("$BLOCKDEV" --getss "$VOLUME" || true)