thin_metadata_size,create_xml_data: fix units

This commit is contained in:
Heinz Mauelshagen 2013-06-26 14:59:25 +02:00
parent 8850204e8c
commit a54f7d18f8
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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