Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/pmap add the member name to an error string so we kn...



details:   https://anonhg.NetBSD.org/src/rev/73a6240534ca
branches:  trunk
changeset: 819915:73a6240534ca
user:      mrg <mrg%NetBSD.org@localhost>
date:      Thu Dec 22 22:41:02 2016 +0000

description:
add the member name to an error string so we know what object failed
while being requested.

diffstat:

 usr.bin/pmap/pmap.h |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (20 lines):

diff -r fb1a379351f7 -r 73a6240534ca usr.bin/pmap/pmap.h
--- a/usr.bin/pmap/pmap.h       Thu Dec 22 20:57:33 2016 +0000
+++ b/usr.bin/pmap/pmap.h       Thu Dec 22 22:41:02 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.h,v 1.8 2009/04/13 00:27:38 lukem Exp $ */
+/*     $NetBSD: pmap.h,v 1.9 2016/12/22 22:41:02 mrg Exp $ */
 
 /*
  * Copyright (c) 2002, 2003 The NetBSD Foundation, Inc.
@@ -95,8 +95,8 @@
        ((size_t)kvm_read((kd), (addr), (dst), (sz)) == (size_t)(sz))
 #define _KDEREF(kd, addr, dst, sz) do { \
        if (!_KDEREFOK((kd), (addr), (dst), (sz))) \
-               errx(1, "trying to read %lu bytes from %lx: %s", \
-                   (unsigned long)(sz), (addr), kvm_geterr(kd)); \
+               errx(1, "trying to read %lu (%s) bytes from %lx: %s", \
+                   (unsigned long)(sz), #sz, (addr), kvm_geterr(kd)); \
 } while (0/*CONSTCOND*/)
 
 /* suck the data using the structure */



Home | Main Index | Thread Index | Old Index