parse-dynparts: list free space on super 70/307270/3
authorJacek Kryszyn <j.kryszyn@samsung.com>
Tue, 20 Feb 2024 15:00:49 +0000 (16:00 +0100)
committerJacek Kryszyn <j.kryszyn@samsung.com>
Wed, 6 Mar 2024 12:36:19 +0000 (13:36 +0100)
commit8f21eaa53d47322e8252784f84d7cdcd3a2433fa
tree1ac83a178c1a50486040c6fac3560678102682ed
parentf035989a7e8f4e779630d97dfdca9753c16336fb
parse-dynparts: list free space on super

Added --free-space flag which allows to list free space on
super partition. Can be combined with --list-tables to print
table as multiple lines. Refactored parse-dynparts a bit so
it doesn't matter in which order --list-tables and --free-space
are given. Filename of super still has to be given as a first
argument to maintain compatibility with existing scripts.

Tests of parse-dynparts were refactored in order to be easier
to maintain. Test data is now created using functions from
liblp instead of external tools and hard to understand
operations on raw structures.

Change-Id: If6446618dae03ff31dc7972c94cc84781dc1b9bb
src/dynamic-partitions/liblp/builder.cpp
src/dynamic-partitions/liblp/include/liblp/builder.h
src/dynamic-partitions/liblp/include/liblp/liblp.h
src/dynamic-partitions/liblp/include/liblp/partition_opener.h [new file with mode: 0644]
src/dynamic-partitions/parse-dynparts/lib.cpp
src/dynamic-partitions/parse-dynparts/lib.hpp
src/dynamic-partitions/parse-dynparts/main.cpp
src/dynamic-partitions/parse-dynparts/test/test.cpp
src/dynamic-partitions/testlib/generate_test_data.sh
src/dynamic-partitions/testlib/metadataio.cpp
src/dynamic-partitions/testlib/metadataio.h