memcpy(uuid->u4, bytes+8, sizeof(uuid->u4));
}
-static char *tilt_backslashes(char *s) {
+char *tilt_backslashes(char *s) {
char *p;
for (p = s; *p; p++)
return s;
}
-static uint16_t *tilt_slashes(uint16_t *s) {
+uint16_t *tilt_slashes(uint16_t *s) {
uint16_t *p;
for (p = s; *p; p++)
int efi_set_boot_order(uint16_t *order, size_t n);
char *utf16_to_utf8(const void *s, size_t length);
+char *tilt_backslashes(char *s);
+uint16_t *tilt_slashes(uint16_t *s);
r = efi_get_boot_option(id, &title, partition, &path);
if (r < 0) {
- fprintf(stderr, "Failed to read EFI boot entry Boot%04X.\n", id);
+ fprintf(stderr, "Failed to read EFI boot entry Boot%04X: %s.\n", id, strerror(-r));
goto finish;
}
partition[0], partition[1], partition[2], partition[3], partition[4], partition[5], partition[6], partition[7],
partition[8], partition[9], partition[10], partition[11], partition[12], partition[13], partition[14], partition[15]);
}
- printf("\n");
finish:
+ printf("\n");
free(title);
free(path);
return r;
r = efi_get_variable_string(EFI_VENDOR_LOADER, "LoaderImageIdentifier", &s);
if (r == 0) {
+ tilt_backslashes(s);
printf(" Loader: %s\n", s);
free(s);
}