static char *arg_root_options = NULL;
static bool arg_noresume = false;
static uint64_t arg_resume_offset = 0;
+static bool arg_resume_offset_set = false;
STATIC_DESTRUCTOR_REGISTER(arg_resume_device, freep);
STATIC_DESTRUCTOR_REGISTER(arg_resume_options, freep);
if (r < 0)
return log_error_errno(r, "Failed to parse resume_offset=%s: %m", value);
+ arg_resume_offset_set = true;
+
} else if (proc_cmdline_key_streq(key, "resumeflags")) {
if (proc_cmdline_value_missing(key, value))
return 0;
}
+ if (!arg_resume_device && arg_resume_offset_set)
+ return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
+ "Found resume_offset=%" PRIu64 " but resume= is unset, refusing.",
+ arg_resume_offset);
+
r = parse_efi_hibernate_location();
if (r == -ENOMEM)
return r;