summaryrefslogtreecommitdiffstats
path: root/src/shared/gpt.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2021-11-10 12:27:26 +0100
committerLennart Poettering <lennart@poettering.net>2021-11-10 15:18:01 +0100
commitd42e4fa258701ff5e094a39149f6cef327adcf52 (patch)
tree0f37c0c10fb95a1512307e5b6295def8c5a1a135 /src/shared/gpt.c
parentarchitecture: drop __riscv__ checks, it's obsolete since 2018 (diff)
downloadsystemd-d42e4fa258701ff5e094a39149f6cef327adcf52.tar.xz
systemd-d42e4fa258701ff5e094a39149f6cef327adcf52.zip
shared: start pushing people gently to define GPT partition type UUIDs for missing archs
Let's generate a single gcc `#warning` message asking people to define partition type UUIDs for their architectures if they are missing.
Diffstat (limited to 'src/shared/gpt.c')
-rw-r--r--src/shared/gpt.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/shared/gpt.c b/src/shared/gpt.c
index a2e39dc1a1..0459ce5bf1 100644
--- a/src/shared/gpt.c
+++ b/src/shared/gpt.c
@@ -4,6 +4,16 @@
#include "string-util.h"
#include "utf8.h"
+/* Gently push people towards defining GPT type UUIDs for all architectures we know */
+#if !defined(GPT_ROOT_NATIVE) || \
+ !defined(GPT_ROOT_NATIVE_VERITY) || \
+ !defined(GPT_ROOT_NATIVE_VERITY_SIG) || \
+ !defined(GPT_USR_NATIVE) || \
+ !defined(GPT_USR_NATIVE_VERITY) || \
+ !defined(GPT_USR_NATIVE_VERITY_SIG)
+#pragma message "Please define GPT partition types for your architecture."
+#endif
+
const GptPartitionType gpt_partition_type_table[] = {
{ GPT_ROOT_X86, "root-x86" },
{ GPT_ROOT_X86_VERITY, "root-x86-verity" },