Module Name:    src
Committed By:   kre
Date:           Mon Mar 20 22:57:05 UTC 2017

Modified Files:
        src/sys/uvm: uvm_bio.c

Log Message:
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...)


To generate a diff of this commit:
cvs rdiff -u -r1.87 -r1.88 src/sys/uvm/uvm_bio.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/uvm/uvm_bio.c
diff -u src/sys/uvm/uvm_bio.c:1.87 src/sys/uvm/uvm_bio.c:1.88
--- src/sys/uvm/uvm_bio.c:1.87	Mon Mar 20 10:44:24 2017
+++ src/sys/uvm/uvm_bio.c	Mon Mar 20 22:57:04 2017
@@ -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, vad
 
 	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 */

Reply via email to