summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDieter Plaetinck <dieter@plaetinck.be>2008-12-11 12:26:09 +0100
committerDieter Plaetinck <dieter@plaetinck.be>2008-12-11 12:26:09 +0100
commit6cc84b5cd73d75761febb5dea6195c02801dc759 (patch)
tree491ff7b31b8728f8d7d07ee44d21b6bf80c241c4 /src
parent4be338ae1ca30d27da681bc57e94f725825a4273 (diff)
fix for incorrect blockdevice size
Diffstat (limited to 'src')
-rw-r--r--src/core/libs/lib-blockdevices-filesystems.sh1
-rw-r--r--src/core/libs/lib-ui-interactive.sh4
2 files changed, 3 insertions, 2 deletions
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