bootctl: refuse --variables=yes when EFI support is disabled

This commit is contained in:
Yu Watanabe
2026-02-13 16:08:23 +09:00
parent 02d8d9c523
commit 3c5ed73030
+5
View 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: