]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
bootctl: refuse --variables=yes when EFI support is disabled
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 21 Jan 2026 11:52:52 +0000 (20:52 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 13 Feb 2026 07:08:23 +0000 (16:08 +0900)
src/bootctl/bootctl.c

index e586c7f0dabc7c11f51da0b390d49f51b77e3127..77a4d5559329cc4dc9d145780251c080c74f75af 100644 (file)
@@ -524,6 +524,11 @@ static int parse_argv(int argc, char *argv[]) {
                         r = parse_tristate_argument("--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: