Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/uvm Ugh. This stuff is disgusting. We really need an...



details:   https://anonhg.NetBSD.org/src/rev/1fbe0f6cba88
branches:  trunk
changeset: 822456:1fbe0f6cba88
user:      kre <kre%NetBSD.org@localhost>
date:      Mon Mar 20 22:57:04 2017 +0000

description:
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...)

diffstat:

 sys/uvm/uvm_bio.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (37 lines):

diff -r 6b0b25bfabdb -r 1fbe0f6cba88 sys/uvm/uvm_bio.c
--- a/sys/uvm/uvm_bio.c Mon Mar 20 22:42:39 2017 +0000
+++ b/sys/uvm/uvm_bio.c Mon Mar 20 22:57:04 2017 +0000
@@ -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 @@
 
        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 */



Home | Main Index | Thread Index | Old Index