Skip to contentSkip to conversation

stable-2.02 - fsadm: fix bash artihmetic

PATCH Zdenek Kabelac 1 participant 1 message Oct 25, 2020

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=50ac89448fef4fc223e52f5a843b0709111006cb
Commit:        50ac89448fef4fc223e52f5a843b0709111006cb
Parent:        a12574303d282779327bc93283edc72fd1b0772e
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Sun Oct 25 21:44:36 2020 +0100
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Sun Oct 25 21:45:49 2020 +0100

fsadm: fix bash artihmetic

These shell vars needs to be without "".

---
 scripts/fsadm.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/fsadm.sh +1 -1
index e20401be1..9b95d318d 100755
@@ -383,7 +383,7 @@ detect_device_size() {
 		test -n "$DEVSIZE" || error "Cannot read size of device \"$VOLUME\"."
 		SSSIZE=$("$BLOCKDEV" --getss "$VOLUME" || true)
 		test -n "$SSSIZE" || error "Cannot read sector size of device \"$VOLUME\"."
-		DEVSIZE=$(("$DEVSIZE" * "$SSSIZE"))
+		DEVSIZE=$(( $DEVSIZE * $SSSIZE ))
 	fi
 }