]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
dissect: pick up gpt partition flags
authorLennart Poettering <lennart@poettering.net>
Wed, 30 Nov 2022 17:55:05 +0000 (18:55 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 2 Dec 2022 21:52:48 +0000 (22:52 +0100)
Let's store the GPT partition flags in the dissected partition info.

Right now we won't actually use them for anything yet, but later we'll
add that, when enforcing policy on dissection.

src/shared/dissect-image.c
src/shared/dissect-image.h

index 112781a9df34e396d0de2a75a1e0d8d756d2e5ff..4dd2c2c3a9c9433d9aa4645e1eecb948889be68a 100644 (file)
@@ -934,6 +934,7 @@ static int dissect_image(
                                         .mount_node_fd = TAKE_FD(mount_node_fd),
                                         .offset = (uint64_t) start * 512,
                                         .size = (uint64_t) size * 512,
+                                        .gpt_flags = pflags,
                                 };
                         }
 
index 2f77228a1d5a7c29929de921e1d2f697519a9904..5402e4fca2e9eebb15fd4d1325df48155127d09c 100644 (file)
@@ -33,6 +33,7 @@ struct DissectedPartition {
         int mount_node_fd;
         uint64_t size;
         uint64_t offset;
+        uint64_t gpt_flags;
 };
 
 #define DISSECTED_PARTITION_NULL                                        \