/* Try all keyslot */
for (json_idx = 0; json_idx < size; json_idx++)
{
+ char indexstr[21]; /* log10(2^64) ~ 20, plus NUL character. */
typeof (source->total_sectors) max_crypt_sectors = 0;
grub_errno = GRUB_ERR_NONE;
continue;
}
+ grub_snprintf (indexstr, sizeof (indexstr) - 1, "%" PRIuGRUB_UINT64_T, keyslot.idx);
/*
* TRANSLATORS: It's a cryptographic key slot: one element of an array
* where each element is either empty or holds a key.
*/
- grub_printf_ (N_("Slot \"%" PRIuGRUB_UINT64_T "\" opened\n"), keyslot.idx);
+ grub_printf_ (N_("Slot \"%s\" opened\n"), indexstr);
candidate_key_len = keyslot.key_size;
break;
return err;
break;
default:
- return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
- N_("relocation 0x%" PRIxGRUB_UINT64_T
- " is not implemented yet"),
- ELF_R_TYPE (rel->r_info));
+ {
+ char rel_info[17]; /* log16(2^64) = 16, plus NUL. */
+
+ grub_snprintf (rel_info, sizeof (rel_info) - 1, "%" PRIxGRUB_UINT64_T,
+ ELF_R_TYPE (rel->r_info));
+ return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
+ N_("relocation 0x%s is not implemented yet"), rel_info);
+ }
}
}
}
break;
default:
- return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
- N_("relocation 0x%" PRIxGRUB_UINT64_T
- " is not implemented yet"),
- ELF_R_TYPE (rel->r_info));
+ {
+ char rel_info[17]; /* log16(2^64) = 16, plus NUL. */
+
+ grub_snprintf (rel_info, sizeof (rel_info) - 1, "%" PRIxGRUB_UINT64_T,
+ ELF_R_TYPE (rel->r_info));
+ return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
+ N_("relocation 0x%s is not implemented yet"), rel_info);
+ }
}
}
case R_IA64_LDXMOV:
break;
default:
- return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
- N_("relocation 0x%" PRIxGRUB_UINT64_T
- " is not implemented yet"),
- ELF_R_TYPE (rel->r_info));
+ {
+ char rel_info[17]; /* log16(2^64) = 16, plus NUL. */
+
+ grub_snprintf (rel_info, sizeof (rel_info) - 1, "%" PRIxGRUB_UINT64_T,
+ ELF_R_TYPE (rel->r_info));
+ return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
+ N_("relocation 0x%s is not implemented yet"), rel_info);
+ }
}
}
return GRUB_ERR_NONE;
case R_RISCV_RELAX:
break;
default:
- return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
- N_("relocation 0x%" PRIxGRUB_UINT64_T
- " is not implemented yet"),
- (grub_uint64_t) ELF_R_TYPE (rel->r_info));
+ {
+ char rel_info[17]; /* log16(2^64) = 16, plus NUL. */
+
+ grub_snprintf (rel_info, sizeof (rel_info) - 1, "%" PRIxGRUB_UINT64_T,
+ (grub_uint64_t) ELF_R_TYPE (rel->r_info));
+ return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
+ N_("relocation 0x%s is not implemented yet"), rel_info);
+ }
}
}
& 0x1fff);
break;
default:
- return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
- N_("relocation 0x%" PRIxGRUB_UINT64_T
- " is not implemented yet"),
- ELF_R_TYPE (rel->r_info));
+ {
+ char rel_info[17]; /* log16(2^64) = 16, plus NUL. */
+
+ grub_snprintf (rel_info, sizeof (rel_info) - 1, "%" PRIxGRUB_UINT64_T,
+ ELF_R_TYPE (rel->r_info));
+ return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
+ N_("relocation 0x%s is not implemented yet"), rel_info);
+ }
}
}
break;
default:
- return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
- N_("relocation 0x%" PRIxGRUB_UINT64_T
- " is not implemented yet"),
- ELF_R_TYPE (rel->r_info));
+ {
+ char rel_info[17]; /* log16(2^64) = 16, plus NUL. */
+
+ grub_snprintf (rel_info, sizeof (rel_info) - 1, "%" PRIxGRUB_UINT64_T,
+ ELF_R_TYPE (rel->r_info));
+ return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
+ N_("relocation 0x%s is not implemented yet"), rel_info);
+ }
}
}