assert(id);
r = boot_entries_load_config_auto(NULL, NULL, &config);
- if (r < 0)
+ if (r < 0 && r != -ENOKEY) /* don't complain if no GPT is found, hence skip ENOKEY */
return r;
(void) boot_entries_augment_from_loader(&config, true);
assert(userdata);
r = boot_entries_load_config_auto(NULL, NULL, &config);
- if (r < 0)
+ if (r < 0 && r != -ENOKEY) /* don't complain if there's no GPT found */
return r;
(void) boot_entries_augment_from_loader(&config, true);
}
r = find_esp_and_warn(override_esp_path, false, &esp_where, NULL, NULL, NULL, NULL);
- if (r == -ENOKEY) /* find_esp_and_warn() doesn't warn about this case */
- return log_error_errno(r, "Cannot find the ESP partition mount point.");
- if (r < 0) /* But it logs about all these cases, hence don't log here again */
+ if (r < 0) /* we don't log about ENOKEY here, but propagate it, leaving it to the caller to log */
return r;
r = find_xbootldr_and_warn(override_xbootldr_path, false, &xbootldr_where, NULL);
return log_error_errno(errno, KEXEC" is not available: %m");
r = boot_entries_load_config_auto(NULL, NULL, &config);
+ if (r == -ENOKEY) /* The call doesn't log about ENOKEY, let's do so here. */
+ return log_error_errno(r, "Cannot find the ESP partition mount point.");
if (r < 0)
return r;