From a54f7d18f84b729fd99fc918e9d6cb543c0f7eb4 Mon Sep 17 00:00:00 2001 From: Heinz Mauelshagen Date: Wed, 26 Jun 2013 14:59:25 +0200 Subject: [PATCH] thin_metadata_size,create_xml_data: fix units --- thin-provisioning/create_xml_data | 4 ++-- thin-provisioning/thin_metadata_size | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/thin-provisioning/create_xml_data b/thin-provisioning/create_xml_data index 4fb5127..0b7438b 100755 --- a/thin-provisioning/create_xml_data +++ b/thin-provisioning/create_xml_data @@ -15,14 +15,14 @@ $prg = Pathname.new($0).basename def init_units units = {} units[:bytes_per_sector] = 512 - units[:chars] = "bsKkMmGgTtPpEeZzYy" + units[:chars] = "bskKmMgGtTpPeEzZyY" units[:strings] = [ 'bytes', 'sectors', 'kilobytes', 'kibibytes', 'megabytes', 'mebibytes', 'gigabytes', 'gibibytes', 'terabytes', 'tebibytes', 'petabytes', 'pebibytes', 'exabytes', 'ebibytes', 'zetabytes', 'zebibytes', 'yottabytes', 'yobibytes' ] units[:factors] = [ 1, units[:bytes_per_sector] ] - 1.step(8) { |e| units[:factors] += [ 1000**e, 1024**e ] } + 1.step(8) { |e| units[:factors] += [ 1024**e, 1000**e ] } units end diff --git a/thin-provisioning/thin_metadata_size b/thin-provisioning/thin_metadata_size index 0895af4..04e9eb7 100755 --- a/thin-provisioning/thin_metadata_size +++ b/thin-provisioning/thin_metadata_size @@ -20,14 +20,14 @@ $prg = Pathname.new($0).basename def init_units units = {} units[:bytes_per_sector] = 512 - units[:chars] = "bsKkMmGgTtPpEeZzYy" + units[:chars] = "bskKmMgGtTpPeEzZyY" units[:strings] = [ 'bytes', 'sectors', 'kilobytes', 'kibibytes', 'megabytes', 'mebibytes', 'gigabytes', 'gibibytes', 'terabytes', 'tebibytes', 'petabytes', 'pebibytes', 'exabytes', 'ebibytes', 'zetabytes', 'zebibytes', 'yottabytes', 'yobibytes' ] units[:factors] = [ 1, units[:bytes_per_sector] ] - 1.step(8) { |e| units[:factors] += [ 1000**e, 1024**e ] } + 1.step(8) { |e| units[:factors] += [ 1024**e, 1000**e ] } units end