summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2022-06-15 17:10:16 +0200
committerDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2022-06-15 17:11:07 +0200
commitf704b9b0617e2257544d983e3b9f5dbffa87ba03 (patch)
tree172b009be79d461d517fd95e1108d382ace7fae9
parent9da920b9c8464ca953aed1de2cbf838acfbb0825 (diff)
downloadvendor_replicant-scripts-master.tar.gz
vendor_replicant-scripts-master.tar.bz2
vendor_replicant-scripts-master.zip
data: parse-partition-tables: fix bad sizesHEADreplicant-6.0master
Without that fix, MiB became GiB when using the following command: ./parse_partition_tables.py redmine /path/to/file.pit Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
-rwxr-xr-xdata/parse-partition-tables/parse_partition_tables.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/data/parse-partition-tables/parse_partition_tables.py b/data/parse-partition-tables/parse_partition_tables.py
index 784cfc5..3781562 100755
--- a/data/parse-partition-tables/parse_partition_tables.py
+++ b/data/parse-partition-tables/parse_partition_tables.py
@@ -29,7 +29,8 @@ def usage(progname):
def get_human_size(size):
size_names = {
- 1024*1024 : 'GiB',
+ 1024*1024*1024 : 'GiB',
+ 1024*1024 : 'MiB',
1024 : 'KiB',
}