diff options
author | Dieter Plaetinck <dieter@plaetinck.be> | 2008-12-11 11:32:52 +0100 |
---|---|---|
committer | Dieter Plaetinck <dieter@plaetinck.be> | 2008-12-11 11:32:52 +0100 |
commit | 4be338ae1ca30d27da681bc57e94f725825a4273 (patch) | |
tree | 120c7a2534cbce41de1dff2bc557b8da1e031cfe /src/core | |
parent | a8df7a3e2c3f9aec4bf5a2a3fdc5e94e0e3fbe87 (diff) |
block device size bugfix
Diffstat (limited to 'src/core')
-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 |