]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
boot-entry: add 'auto' keyword to parse_boot_entry_token_type
authorDuncan Overbruck <mail@duncano.de>
Fri, 13 Mar 2026 21:35:42 +0000 (22:35 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 27 Mar 2026 22:16:54 +0000 (23:16 +0100)
Add the auto keyword as documented in the help message and man pages of
`kernel-install`, `bootctl` and `systemd-pcrlock`.

src/shared/boot-entry.c

index 0f1d8090247a6eec8876c78e7b46dd02fa2be378..c9e966ba04ea883bfea6a930dc02368e5f32b36e 100644 (file)
@@ -253,6 +253,12 @@ int parse_boot_entry_token_type(const char *s, BootEntryTokenType *type, char **
          * Hence, do not pass in uninitialized pointers.
          */
 
+        if (streq(s, "auto")) {
+                *type = BOOT_ENTRY_TOKEN_AUTO;
+                *token = mfree(*token);
+                return 0;
+        }
+
         if (streq(s, "machine-id")) {
                 *type = BOOT_ENTRY_TOKEN_MACHINE_ID;
                 *token = mfree(*token);