boot_loader_read_conf(), boot_entries_find(), boot_entries_load_config()
all log their errors internally, hence no need to log a second or third
time about the same error when they return.
r = boot_entries_load_config(esp_path, &config);
if (r < 0)
- return log_error_errno(r, "Failed to load bootspec config from \"%s/loader\": %m",
- esp_path);
+ return r;
if (config.default_entry < 0)
printf("%zu entries, no entry suitable as default\n", config.n_entries);
r = boot_entries_load_config(arg_path, &config);
if (r < 0)
- return log_error_errno(r, "Failed to load bootspec config from \"%s/loader\": %m",
- arg_path);
+ return r;
printf("Available boot entries:\n");
p = strjoina(esp_path, "/loader/loader.conf");
r = boot_loader_read_conf(p, config);
if (r < 0)
- return log_error_errno(r, "Failed to read boot config from \"%s\": %m", p);
+ return r;
p = strjoina(esp_path, "/loader/entries");
r = boot_entries_find(p, &config->entries, &config->n_entries);
if (r < 0)
- return log_error_errno(r, "Failed to read boot entries from \"%s\": %m", p);
+ return r;
r = boot_entries_uniquify(config->entries, config->n_entries);
if (r < 0)