]> rtime.felk.cvut.cz Git - jailhouse.git/commit
tools: config-create: drop line numbers in parse_iomem_tree()
authorBenjamin Block <bebl@mageta.org>
Fri, 7 Nov 2014 17:57:10 +0000 (18:57 +0100)
committerJan Kiszka <jan.kiszka@siemens.com>
Wed, 12 Nov 2014 14:06:01 +0000 (15:06 +0100)
commitaf04f8ff1facdbbdf3f3c68c9dd7f37747df4722
tree6243ee018ce22a908cadb668f91fcc4361bd825d
parent33a74164569b92b0a6c987b276633c45d5d3baf4
tools: config-create: drop line numbers in parse_iomem_tree()

Previously we defined the children of a MemRegion-Tree as set. This
caused the order of the children to be undefined as soon as they got
added to this structure. But the using function of parse_iomem_tree()
wanted the list of regions returned to be sorted like in the file, so we
had to maintain a separate list of line numbers.

By changing the set to a list, the order is always maintained and
because parse_iomem_tree() only adds to his private regions-list and
never inserts or reorders, this private structure will also always have
the same order as in the file. With this we can remove the
line numbers list. This structure was never use for anything else, so it
will make the code more readable.

Signed-off-by: Benjamin Block <bebl@mageta.org>
Reviewed-by: Henning Schild <henning.schild@siemens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
tools/jailhouse-config-create