mountfsd: also return suggested mount point paths for the returned partitions

When mounting a disk image we return a bunch of mount fds referencing
the various partitions in the disk, along with some metadata about them.
One key metadata field is the "designator" which is supposed to tell
clients what is what, and where to mount it.

Let's make this more explicit: let's also include the literal relative
path where each mount shall be placed, to simplify implementations of
clients that do not care about the concept of designators.
This commit is contained in:
Lennart Poettering
2025-03-11 18:20:31 +01:00
parent 00c17ad5cf
commit 0ecfcc9790
4 changed files with 16 additions and 3 deletions
@@ -42,7 +42,9 @@ static SD_VARLINK_DEFINE_STRUCT_TYPE(
SD_VARLINK_FIELD_COMMENT("The start offset of the partition in bytes."),
SD_VARLINK_DEFINE_FIELD(offset, SD_VARLINK_INT, 0),
SD_VARLINK_FIELD_COMMENT("A mount file descriptor to assign to a location."),
SD_VARLINK_DEFINE_FIELD(mountFileDescriptor, SD_VARLINK_INT, 0));
SD_VARLINK_DEFINE_FIELD(mountFileDescriptor, SD_VARLINK_INT, 0),
SD_VARLINK_FIELD_COMMENT("A relative path indicating the intended mount point for this file system, if applicable. May contain multiple paths, for certain partitions that can be mounted to multiple distinct places."),
SD_VARLINK_DEFINE_FIELD(mountPoint, SD_VARLINK_STRING, SD_VARLINK_NULLABLE|SD_VARLINK_ARRAY));
static SD_VARLINK_DEFINE_METHOD(
MountImage,