Source-Changes-HG archive

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

[src/trunk]: src/sys/kern Support ddb-specific nonstandard printf formats %r ...



details:   https://anonhg.NetBSD.org/src/rev/a07995d8c28a
branches:  trunk
changeset: 486567:a07995d8c28a
user:      jhawk <jhawk%NetBSD.org@localhost>
date:      Thu May 25 21:32:41 2000 +0000

description:
Support ddb-specific nonstandard printf formats %r and %z in kprintf(),
even when not called with (flags&TODDB != 0), such that ddb print routines
can use them when printing elsewhere, such as to the message buffer.

diffstat:

 sys/kern/subr_prf.c |  11 +----------
 1 files changed, 1 insertions(+), 10 deletions(-)

diffs (39 lines):

diff -r b06c317349d8 -r a07995d8c28a sys/kern/subr_prf.c
--- a/sys/kern/subr_prf.c       Thu May 25 21:23:37 2000 +0000
+++ b/sys/kern/subr_prf.c       Thu May 25 21:32:41 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: subr_prf.c,v 1.70 2000/05/02 09:29:39 pk Exp $ */
+/*     $NetBSD: subr_prf.c,v 1.71 2000/05/25 21:32:41 jhawk Exp $      */
 
 /*-
  * Copyright (c) 1986, 1988, 1991, 1993
@@ -1060,9 +1060,6 @@
 #ifdef DDB
                /* XXX: non-standard '%r' format (print int in db_radix) */
                case 'r':
-                       if ((oflags & TODDB) == 0) 
-                               goto default_case;
-                       
                        if (db_radix == 16)
                                goto case_z;    /* signed hex */
                        _uquad = SARG();
@@ -1077,9 +1074,6 @@
                /* XXX: non-standard '%z' format ("signed hex", a "hex %i")*/
                case 'z':
                case_z:
-                       if ((oflags & TODDB) == 0) 
-                               goto default_case;
-
                        xdigs = "0123456789abcdef";
                        ch = 'x';       /* the 'x' in '0x' (below) */
                        _uquad = SARG();
@@ -1336,9 +1330,6 @@
                skipsize:
                        break;
                default:        /* "%?" prints ?, unless ? is NUL */
-#ifdef DDB
-               default_case:   /* DDB */
-#endif
                        if (ch == '\0')
                                goto done;
                        /* pretend it was %c with argument ch */



Home | Main Index | Thread Index | Old Index