Fix printf format errors that were undetected due to using the standard
FSF compiler during early development.
This commit is contained in:
parent
5048926df9
commit
5a337b2589
@ -170,7 +170,7 @@ elf_reloc_internal(linker_file_t lf, const void *data, int type, int local)
|
||||
break;
|
||||
|
||||
default:
|
||||
printf("kldload: unexpected relocation type %d\n",
|
||||
printf("kldload: unexpected relocation type %ld\n",
|
||||
rtype);
|
||||
return -1;
|
||||
}
|
||||
|
@ -352,7 +352,7 @@ sigreturn(td, uap)
|
||||
* one less debugger trap, so allowing it is fairly harmless.
|
||||
*/
|
||||
if (!EFL_SECURE(rflags & ~PSL_RF, regs->tf_rflags & ~PSL_RF)) {
|
||||
printf("sigreturn: rflags = 0x%x\n", rflags);
|
||||
printf("sigreturn: rflags = 0x%lx\n", rflags);
|
||||
return (EINVAL);
|
||||
}
|
||||
|
||||
|
@ -1797,8 +1797,8 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot,
|
||||
* Page Directory table entry not valid, we need a new PT page
|
||||
*/
|
||||
if (pte == NULL) {
|
||||
panic("pmap_enter: invalid page directory pdir=%#jx, va=%#x\n",
|
||||
(uintmax_t)pmap->pm_pdir[PTDPTDI], va);
|
||||
panic("pmap_enter: invalid page directory pdir=%#lx, va=%#lx\n",
|
||||
pmap->pm_pdir[PTDPTDI], va);
|
||||
}
|
||||
|
||||
pa = VM_PAGE_TO_PHYS(m) & PG_FRAME;
|
||||
@ -1869,7 +1869,7 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot,
|
||||
err = pmap_remove_pte(pmap, pte, va);
|
||||
vm_page_unlock_queues();
|
||||
if (err)
|
||||
panic("pmap_enter: pte vanished, va: 0x%x", va);
|
||||
panic("pmap_enter: pte vanished, va: 0x%lx", va);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -2563,7 +2563,7 @@ pmap_remove_pages(pmap, sva, eva)
|
||||
tpte = *pte;
|
||||
|
||||
if (tpte == 0) {
|
||||
printf("TPTE at %p IS ZERO @ VA %08x\n",
|
||||
printf("TPTE at %p IS ZERO @ VA %08lx\n",
|
||||
pte, pv->pv_va);
|
||||
panic("bad pte");
|
||||
}
|
||||
|
@ -562,7 +562,8 @@ trap_fatal(frame, eva)
|
||||
struct trapframe *frame;
|
||||
vm_offset_t eva;
|
||||
{
|
||||
int code, type, ss, esp;
|
||||
int code, type, ss;
|
||||
long esp;
|
||||
struct soft_segment_descriptor softseg;
|
||||
|
||||
code = frame->tf_err;
|
||||
@ -574,13 +575,13 @@ trap_fatal(frame, eva)
|
||||
type, trap_msg[type],
|
||||
ISPL(frame->tf_cs) == SEL_UPL ? "user" : "kernel");
|
||||
if (type == T_PAGEFLT) {
|
||||
printf("fault virtual address = 0x%x\n", eva);
|
||||
printf("fault virtual address = 0x%lx\n", eva);
|
||||
printf("fault code = %s %s, %s\n",
|
||||
code & PGEX_U ? "user" : "supervisor",
|
||||
code & PGEX_W ? "write" : "read",
|
||||
code & PGEX_P ? "protection violation" : "page not present");
|
||||
}
|
||||
printf("instruction pointer = 0x%x:0x%x\n",
|
||||
printf("instruction pointer = 0x%lx:0x%lx\n",
|
||||
frame->tf_cs & 0xffff, frame->tf_rip);
|
||||
if (ISPL(frame->tf_cs) == SEL_UPL) {
|
||||
ss = frame->tf_ss & 0xffff;
|
||||
@ -589,9 +590,9 @@ trap_fatal(frame, eva)
|
||||
ss = GSEL(GDATA_SEL, SEL_KPL);
|
||||
esp = (long)&frame->tf_rsp;
|
||||
}
|
||||
printf("stack pointer = 0x%x:0x%x\n", ss, esp);
|
||||
printf("frame pointer = 0x%x:0x%x\n", ss, frame->tf_rbp);
|
||||
printf("code segment = base 0x%x, limit 0x%x, type 0x%x\n",
|
||||
printf("stack pointer = 0x%x:0x%lx\n", ss, esp);
|
||||
printf("frame pointer = 0x%x:0x%lx\n", ss, frame->tf_rbp);
|
||||
printf("code segment = base 0x%lx, limit 0x%x, type 0x%x\n",
|
||||
softseg.ssd_base, softseg.ssd_limit, softseg.ssd_type);
|
||||
printf(" = DPL %d, pres %d, long %d, def32 %d, gran %d\n",
|
||||
softseg.ssd_dpl, softseg.ssd_p, softseg.ssd_long, softseg.ssd_def32,
|
||||
@ -605,7 +606,7 @@ trap_fatal(frame, eva)
|
||||
printf("nested task, ");
|
||||
if (frame->tf_rflags & PSL_RF)
|
||||
printf("resume, ");
|
||||
printf("IOPL = %d\n", (frame->tf_rflags & PSL_IOPL) >> 12);
|
||||
printf("IOPL = %ld\n", (frame->tf_rflags & PSL_IOPL) >> 12);
|
||||
printf("current process = ");
|
||||
if (curproc) {
|
||||
printf("%lu (%s)\n",
|
||||
|
Loading…
x
Reference in New Issue
Block a user