]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
bootctl: override is_efi_boot() check by --variables= option (#40413)
authorZbigniew Jędrzejewski-Szmek <zbyszek@amutable.com>
Wed, 25 Feb 2026 14:42:53 +0000 (15:42 +0100)
committerGitHub <noreply@github.com>
Wed, 25 Feb 2026 14:42:53 +0000 (15:42 +0100)
Fixes #40392.

1  2 
src/bootctl/bootctl-random-seed.c
src/bootctl/bootctl-set-efivar.c
src/bootctl/bootctl-status.c
src/bootctl/bootctl.c

Simple merge
Simple merge
Simple merge
index b69720d66c69d97a795d6be744320100541e2514,a74a131c247cc8c110c38a9fd231703c3c6ae851..da4592a7240a89956447c7a91a40fcbe45ed4623
@@@ -521,9 -498,14 +498,14 @@@ static int parse_argv(int argc, char *a
                          break;
  
                  case ARG_VARIABLES:
 -                        r = parse_tristate_argument("--variables=", optarg, &arg_touch_variables);
 +                        r = parse_tristate_argument_with_auto("--variables=", optarg, &arg_touch_variables);
                          if (r < 0)
                                  return r;
+ #if !ENABLE_EFI
+                         if (arg_touch_variables > 0)
+                                 return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP),
+                                                        "Compiled without support for EFI, --variables=%s cannot be specified.", optarg);
+ #endif
                          break;
  
                  case ARG_NO_VARIABLES: