summaryrefslogtreecommitdiff
path: root/kexec/arch/i386
diff options
context:
space:
mode:
authorPhilip Prindeville <philipp@redfish-solutions.com>2017-03-10 20:12:15 -0700
committerSimon Horman <horms@verge.net.au>2017-03-14 10:23:02 +0100
commit47cc70157c6610d4c01a7ab4f8f0d24ab054b43b (patch)
tree3e1892a6b7a9e19e2542846fa6e785f6165f92f1 /kexec/arch/i386
parent2f6f6d6fef7872647cacc6741ac35ac2b4df7ed5 (diff)
Don't use %L width specifier with integer values
MUSL doesn't support %L except for floating-point arguments; therefore, %ll must be used instead with integer arguments. Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com> Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'kexec/arch/i386')
-rw-r--r--kexec/arch/i386/crashdump-x86.c8
-rw-r--r--kexec/arch/i386/kexec-x86-common.c2
2 files changed, 5 insertions, 5 deletions
diff --git a/kexec/arch/i386/crashdump-x86.c b/kexec/arch/i386/crashdump-x86.c
index c4cf201..285dea9 100644
--- a/kexec/arch/i386/crashdump-x86.c
+++ b/kexec/arch/i386/crashdump-x86.c
@@ -119,7 +119,7 @@ static unsigned long long get_kernel_sym(const char *symbol)
}
while(fgets(line, sizeof(line), fp) != NULL) {
- if (sscanf(line, "%Lx %c %s", &vaddr, &type, sym) != 3)
+ if (sscanf(line, "%llx %c %s", &vaddr, &type, sym) != 3)
continue;
if (strcmp(sym, symbol) == 0) {
dbgprintf("kernel symbol %s vaddr = %16llx\n", symbol, vaddr);
@@ -296,12 +296,12 @@ static int get_crash_memory_ranges(struct memory_range **range, int *ranges,
if (memory_ranges >= CRASH_MAX_MEMORY_RANGES)
break;
- count = sscanf(line, "%Lx-%Lx : %n",
+ count = sscanf(line, "%llx-%llx : %n",
&start, &end, &consumed);
if (count != 2)
continue;
str = line + consumed;
- dbgprintf("%016Lx-%016Lx : %s",
+ dbgprintf("%016llx-%016llx : %s",
start, end, str);
/* Only Dumping memory of type System RAM. */
if (memcmp(str, "System RAM\n", 11) == 0) {
@@ -778,7 +778,7 @@ static int get_crash_notes(int cpu, uint64_t *addr, uint64_t *len)
*addr = x86__pa(vaddr + (cpu * MAX_NOTE_BYTES));
*len = MAX_NOTE_BYTES;
- dbgprintf("crash_notes addr = %Lx\n",
+ dbgprintf("crash_notes addr = %llx\n",
(unsigned long long)*addr);
fclose(fp);
diff --git a/kexec/arch/i386/kexec-x86-common.c b/kexec/arch/i386/kexec-x86-common.c
index 3e97239..be03618 100644
--- a/kexec/arch/i386/kexec-x86-common.c
+++ b/kexec/arch/i386/kexec-x86-common.c
@@ -81,7 +81,7 @@ static int get_memory_ranges_proc_iomem(struct memory_range **range, int *ranges
int count;
if (memory_ranges >= MAX_MEMORY_RANGES)
break;
- count = sscanf(line, "%Lx-%Lx : %n",
+ count = sscanf(line, "%llx-%llx : %n",
&start, &end, &consumed);
if (count != 2)
continue;