tools/image-info: mount with the mount options

Before the new version of image-info was ignoring the mount options for
the devices leading to errors in the resulting json.
This commit is contained in:
Thomas Lavocat 2023-01-26 17:09:26 +01:00 committed by Achilleas Koutsou
parent 62e6bed23d
commit ffd45d635a

View file

@ -2632,8 +2632,13 @@ def append_partitions(report, image):
info = index.get_module_info("Mount", "org.osbuild.xfs")
else:
raise RuntimeError("Unknown file system")
options = { "readonly":True }
options = {"readonly": True}
for option in part_options:
if "=" in option:
parts = option.split("=")
options[parts[0]] = parts[1]
else:
options[option] = True
# the first mount point should be root
if n == 0: