Ugh. This stuff is disgusting. We really need an arch dependent
PRIxOFF (and PRIdOFF) to print off_t's in a way that matches the arch's definition of off_t. In the meantime fall back on %jx and an (intmax_t) cast. Ugly. (And the way it is written is even uglier...)
This commit is contained in:
parent
333c92f0be
commit
cd91c66b27
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: uvm_bio.c,v 1.87 2017/03/20 10:44:24 kre Exp $ */
|
||||
/* $NetBSD: uvm_bio.c,v 1.88 2017/03/20 22:57:04 kre Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998 Chuck Silvers.
|
||||
|
@ -34,7 +34,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: uvm_bio.c,v 1.87 2017/03/20 10:44:24 kre Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: uvm_bio.c,v 1.88 2017/03/20 22:57:04 kre Exp $");
|
||||
|
||||
#include "opt_uvmhist.h"
|
||||
#include "opt_ubc.h"
|
||||
|
@ -348,15 +348,15 @@ ubc_fault(struct uvm_faultinfo *ufi, vaddr_t ign1, struct vm_page **ign2,
|
|||
|
||||
if ((access_type & VM_PROT_WRITE) != 0) {
|
||||
#ifndef PRIxOFF /* XXX */
|
||||
#define PRIxOFF "llx" /* XXX */
|
||||
#define PRIxOFF "jx" /* XXX */
|
||||
#endif /* XXX */
|
||||
KASSERTMSG((trunc_page(umap->writeoff) <= slot_offset),
|
||||
"out of range write: slot=%#"PRIxVSIZE" off=%#"PRIxOFF,
|
||||
slot_offset, umap->writeoff);
|
||||
slot_offset, (intmax_t)umap->writeoff);
|
||||
KASSERTMSG((slot_offset < umap->writeoff + umap->writelen),
|
||||
"out of range write: slot=%#"PRIxVADDR
|
||||
" off=%#"PRIxOFF" len=%#"PRIxVSIZE,
|
||||
slot_offset, umap->writeoff, umap->writelen);
|
||||
slot_offset, (intmax_t_umap->writeoff, umap->writelen);
|
||||
}
|
||||
|
||||
/* no umap locking needed since we have a ref on the umap */
|
||||
|
|
Loading…
Reference in New Issue