From 6cc84b5cd73d75761febb5dea6195c02801dc759 Mon Sep 17 00:00:00 2001 From: Dieter Plaetinck Date: Thu, 11 Dec 2008 12:26:09 +0100 Subject: fix for incorrect blockdevice size --- src/core/libs/lib-blockdevices-filesystems.sh | 1 + src/core/libs/lib-ui-interactive.sh | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/core/libs/lib-blockdevices-filesystems.sh b/src/core/libs/lib-blockdevices-filesystems.sh index 4f3ae1b..440c449 100644 --- a/src/core/libs/lib-blockdevices-filesystems.sh +++ b/src/core/libs/lib-blockdevices-filesystems.sh @@ -598,6 +598,7 @@ get_filesystem_program () # $1 blockdevice # $2 standard SI for 1000*n, IEC for 1024*n (optional. defaults to SI) +# --> Note that if you do SI on a partition, you get the size of the entire disk, so for now you need IEC for single partitions # output will be in $BLOCKDEVICE_SIZE in MB/MiB get_blockdevice_size () { diff --git a/src/core/libs/lib-ui-interactive.sh b/src/core/libs/lib-ui-interactive.sh index cf05159..09813c9 100644 --- a/src/core/libs/lib-ui-interactive.sh +++ b/src/core/libs/lib-ui-interactive.sh @@ -402,8 +402,8 @@ interactive_filesystems() { # leave out unneeded info from fs string fs_display=${fs//;yes/} fs_display=${fs//;target/} - infostring=",$type,$label,$fs_display" - [ -b "$part" ] && get_blockdevice_size ${part/+/} && infostring="${BLOCKDEVICE_SIZE}MB,$infostring" # add size in MB for existing blockdevices (eg not for mapper devices that are not yet created yet) + infostring="$type,$label,$fs_display" + [ -b ${part/+/} ] && get_blockdevice_size ${part/+/} IEC && infostring="${BLOCKDEVICE_SIZE}MB,$infostring" # add size in MB for existing blockdevices (eg not for mapper devices that are not yet created yet) #TODO: ${BLOCKDEVICE_SIZE} is empty? menu_list="$menu_list $part $infostring" #don't add extra spaces, dialog doesn't like that. done < $TMP_BLOCKDEVICES -- cgit v1.2.3-54-g00ecf