Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/atari/dev rename NV_DEBUG to NVRAM_DEBUG
details: https://anonhg.NetBSD.org/src/rev/831e96c1283e
branches: trunk
changeset: 336569:831e96c1283e
user: christos <christos%NetBSD.org@localhost>
date: Fri Mar 06 12:41:05 2015 +0000
description:
rename NV_DEBUG to NVRAM_DEBUG
diffstat:
sys/arch/atari/dev/nvram.c | 20 +++++++++++---------
1 files changed, 11 insertions(+), 9 deletions(-)
diffs (56 lines):
diff -r 8ddecff93736 -r 831e96c1283e sys/arch/atari/dev/nvram.c
--- a/sys/arch/atari/dev/nvram.c Fri Mar 06 12:24:36 2015 +0000
+++ b/sys/arch/atari/dev/nvram.c Fri Mar 06 12:41:05 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nvram.c,v 1.19 2011/06/05 06:33:43 tsutsui Exp $ */
+/* $NetBSD: nvram.c,v 1.20 2015/03/06 12:41:05 christos Exp $ */
/*
* Copyright (c) 1995 Leo Weppelman.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nvram.c,v 1.19 2011/06/05 06:33:43 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nvram.c,v 1.20 2015/03/06 12:41:05 christos Exp $");
#include <sys/param.h>
#include <sys/conf.h>
@@ -51,6 +51,12 @@
#include "nvr.h"
+#ifdef NVRAM_DEBUG
+#define DPRINTF(a) printf a
+#else
+#define DPRINTF(a)
+#endif
+
#define MC_NVRAM_CSUM (MC_NVRAM_START + MC_NVRAM_SIZE - 2)
#if NNVR > 0
@@ -136,11 +142,9 @@
if (!(sc->sc_flags & NVR_CONFIGURED))
return ENXIO;
-#ifdef NV_DEBUG
- printf("Request to transfer %d bytes offset: %d, %s nvram\n",
+ DPRINTF(("Request to transfer %d bytes offset: %d, %s nvram\n",
(long)uio->uio_resid, (long)uio->uio_offset,
- (uio->uio_rw == UIO_READ) ? "from" : "to");
-#endif /* NV_DEBUG */
+ (uio->uio_rw == UIO_READ) ? "from" : "to"));
offset = uio->uio_offset + MC_NVRAM_START;
nleft = uio->uio_resid;
@@ -151,9 +155,7 @@
if (nleft <= 0)
return (EINVAL);
}
-#ifdef NV_DEBUG
- printf("Translated: offset = %d, bytes: %d\n", (long)offset, nleft);
-#endif /* NV_DEBUG */
+ DPRINTF(("Translated: offset = %d, bytes: %d\n", (long)offset, nleft));
if (uio->uio_rw == UIO_READ) {
for (i = 0, p = buf; i < nleft; i++, p++)
Home |
Main Index |
Thread Index |
Old Index