From d90b03f80d7d2a104783e0582a33a29e8a05cbca Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 30 Nov 2022 18:55:05 +0100 Subject: [PATCH] dissect: pick up gpt partition flags 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 | 1 + src/shared/dissect-image.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/shared/dissect-image.c b/src/shared/dissect-image.c index 112781a9df3..4dd2c2c3a9c 100644 --- a/src/shared/dissect-image.c +++ b/src/shared/dissect-image.c @@ -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, }; } diff --git a/src/shared/dissect-image.h b/src/shared/dissect-image.h index 2f77228a1d5..5402e4fca2e 100644 --- a/src/shared/dissect-image.h +++ b/src/shared/dissect-image.h @@ -33,6 +33,7 @@ struct DissectedPartition { int mount_node_fd; uint64_t size; uint64_t offset; + uint64_t gpt_flags; }; #define DISSECTED_PARTITION_NULL \ -- 2.47.3