diff options
-rw-r--r-- | src/core/libs/lib-blockdevices-filesystems.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/libs/lib-blockdevices-filesystems.sh b/src/core/libs/lib-blockdevices-filesystems.sh index 6b1b30a..4f3ae1b 100644 --- a/src/core/libs/lib-blockdevices-filesystems.sh +++ b/src/core/libs/lib-blockdevices-filesystems.sh @@ -604,10 +604,10 @@ get_blockdevice_size () [ -b "$1" ] || die_error "get_blockdevice_size needs a blockdevice as \$1 ($1 given)" standard=${2:-SI} - if [ "$2" = SI ] + if [ "$standard" = SI ] then BLOCKDEVICE_SIZE=$(hdparm -I $1 | grep -F '1000*1000' | sed "s/^.*:[ \t]*\([0-9]*\) MBytes.*$/\1/") - elif [ "$2" = IEC ] + elif [ "$standard" = IEC ] then blocks=`fdisk -s $1` || show_warning "Fdisk problem" "Something failed when trying to do fdisk -s $1" #NOTE: on some interwebs they say 1 block = 512B, on other internets they say 1 block = 1kiB. 1kiB seems to work for me. don't sue me if it doesn't for you |