]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
shared: start pushing people gently to define GPT partition type UUIDs for missing...
authorLennart Poettering <lennart@poettering.net>
Wed, 10 Nov 2021 11:27:26 +0000 (12:27 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 10 Nov 2021 14:18:01 +0000 (15:18 +0100)
Let's generate a single gcc `#warning`  message asking people to define
partition type UUIDs for their architectures if they are missing.

src/shared/gpt.c

index a2e39dc1a15720af448c04c88d152e6bb968546f..0459ce5bf13acf6bb75ad4cc3cb650c8bfc5cc13 100644 (file)
@@ -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"             },