It's much easier to understand what is going on when the full path is
logged.
assert(entry);
free(entry->id);
+ free(entry->path);
free(entry->title);
free(entry->show_title);
free(entry->version);
if (!tmp.id)
return log_oom();
+ tmp.path = strdup(path);
+ if (!tmp.path)
+ return log_oom();
+
f = fopen(path, "re");
if (!f)
return log_error_errno(errno, "Failed to open \"%s\": %m", path);
}
*e = &config->entries[config->default_entry];
+ log_debug("Found default boot entry in file \"%s\"", (*e)->path);
if (esp_where)
*esp_where = TAKE_PTR(where);
#include "sd-id128.h"
typedef struct BootEntry {
- char *id;
+ char *id; /* This is the file basename without extension */
+ char *path; /* This is the full path to the file */
char *title;
char *show_title;
char *version;