Skip to content

Commit

Permalink
kexec: i386: Fix format specifiers for various printf() and scanf()
Browse files Browse the repository at this point in the history
Compiler is not happy when wrong specifier is being used.
Fix them all.

Signed-off-by: Andy Shevchenko <[email protected]>
Signed-off-by: Simon Horman <[email protected]>
  • Loading branch information
andy-shev authored and horms committed Oct 14, 2024
1 parent 8767f1e commit 07821da
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion kexec/arch/i386/crashdump-x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,7 @@ static void cmdline_add_efi(char *cmdline)
if (!acpi_rsdp)
return;

sprintf(acpi_rsdp_buf, " acpi_rsdp=0x%lx", acpi_rsdp);
sprintf(acpi_rsdp_buf, " acpi_rsdp=0x%llx", acpi_rsdp);
if (strlen(cmdline) + strlen(acpi_rsdp_buf) > (COMMAND_LINE_SIZE - 1))
die("Command line overflow\n");

Expand Down
2 changes: 1 addition & 1 deletion kexec/arch/i386/kexec-x86-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ static uint64_t efi_get_acpi_rsdp(void) {
/* ACPI20= always goes before ACPI= */
if ((strstr(line, "ACPI20=")) || (strstr(line, "ACPI="))) {
s = strchr(line, '=') + 1;
sscanf(s, "0x%lx", &acpi_rsdp);
sscanf(s, "0x%llx", &acpi_rsdp);
break;
}
}
Expand Down
2 changes: 1 addition & 1 deletion kexec/arch/i386/x86-linux-setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@ static void add_e820_map_from_mr(struct x86_linux_param_header *real_mode,
e820[i].type = E820_RESERVED;
break;
}
dbgprintf("%016lx-%016lx (%d)\n",
dbgprintf("%016llx-%016llx (%d)\n",
e820[i].addr,
e820[i].addr + e820[i].size - 1,
e820[i].type);
Expand Down

0 comments on commit 07821da

Please sign in to comment.