create_xml_data: fix device and range_mapping
This commit is contained in:
parent
d87fa1e0ee
commit
8850204e8c
@ -99,7 +99,7 @@ def single_mapping(from, to = 4711)
|
|||||||
end
|
end
|
||||||
|
|
||||||
def range_mapping(from, to, length)
|
def range_mapping(from, to, length)
|
||||||
" <range_mapping time=\"0\" origin_begin=\"#{from}\" data_begin=.\"#{to}\" length=\"#{length}\"/>\n"
|
" <range_mapping time=\"0\" origin_begin=\"#{from}\" data_begin=\"#{to}\" length=\"#{length}\"/>\n"
|
||||||
end
|
end
|
||||||
|
|
||||||
def xml_metadata(opts, units)
|
def xml_metadata(opts, units)
|
||||||
@ -107,7 +107,7 @@ def xml_metadata(opts, units)
|
|||||||
|
|
||||||
puts begin_superblock(opts[:blocksize], opts[:thins] * blocks)
|
puts begin_superblock(opts[:blocksize], opts[:thins] * blocks)
|
||||||
0.step(opts[:thins] - 1) do |devid|
|
0.step(opts[:thins] - 1) do |devid|
|
||||||
puts begin_device(devid, opts[:thinsize])
|
puts begin_device(devid, blocks)
|
||||||
if opts[:range]
|
if opts[:range]
|
||||||
puts range_mapping(0, to, blocks)
|
puts range_mapping(0, to, blocks)
|
||||||
to += blocks
|
to += blocks
|
||||||
|
Loading…
Reference in New Issue
Block a user