Module Name:    src
Committed By:   jakllsch
Date:           Sat Mar  4 01:29:27 UTC 2017

Modified Files:
        src/sys/arch/shark/ofw: ofw.c

Log Message:
Fix up OFW_DEBUG printfs, particularly regarding newlines and error cases.


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/sys/arch/shark/ofw/ofw.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/arch/shark/ofw/ofw.c
diff -u src/sys/arch/shark/ofw/ofw.c:1.66 src/sys/arch/shark/ofw/ofw.c:1.67
--- src/sys/arch/shark/ofw/ofw.c:1.66	Thu Dec 22 14:47:59 2016
+++ src/sys/arch/shark/ofw/ofw.c	Sat Mar  4 01:29:27 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: ofw.c,v 1.66 2016/12/22 14:47:59 cherry Exp $	*/
+/*	$NetBSD: ofw.c,v 1.67 2017/03/04 01:29:27 jakllsch Exp $	*/
 
 /*
  * Copyright 1997
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ofw.c,v 1.66 2016/12/22 14:47:59 cherry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofw.c,v 1.67 2017/03/04 01:29:27 jakllsch Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1755,8 +1755,12 @@ ofw_gettranslation(vaddr_t va)
 #endif
 	exists = 0;	    /* gets set to true if translation exists */
 	if (OF_call_method("translate", mmu_ihandle, 1, 3, va, &pa, &mode,
-	    &exists) != 0)
+	    &exists) != 0) {
+#ifdef OFW_DEBUG
+		printf("(failed)\n");
+#endif
 		return(-1);
+	}
 
 #ifdef OFW_DEBUG
 	printf("%d %x\n", exists, (uint32_t)pa);
@@ -1771,7 +1775,7 @@ ofw_settranslation(vaddr_t va, paddr_t p
 	int mmu_ihandle = ofw_mmu_ihandle();
 
 #ifdef OFW_DEBUG
-	printf("ofw_settranslation (%x, %x, %x, %x) --> void", (uint32_t)va,
+	printf("ofw_settranslation (%x, %x, %x, %x) --> void\n", (uint32_t)va,
 	    (uint32_t)pa, (uint32_t)size, (uint32_t)mode);
 #endif
 	if (OF_call_method("map", mmu_ihandle, 4, 0, pa, va, size, mode) != 0)

Reply via email to