]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/kern/printf.c
xnu-2050.48.11.tar.gz
[apple/xnu.git] / osfmk / kern / printf.c
index fd04f883a2c1a27cd4f2ab8afaf0c4729a872a04..88813d84431488966834aebc2a04180f667b83e9 100644 (file)
  */
 
 #include <debug.h>
  */
 
 #include <debug.h>
-#include <mach_kdb.h>
 #include <mach_kdp.h>
 #include <platforms.h>
 #include <mach/boolean.h>
 #include <mach_kdp.h>
 #include <platforms.h>
 #include <mach/boolean.h>
 #endif
 #include <console/serial_protos.h>
 
 #endif
 #include <console/serial_protos.h>
 
-#ifdef __ppc__
-#include <ppc/Firmware.h>
-#endif
-
 #define isdigit(d) ((d) >= '0' && (d) <= '9')
 #define Ctod(c) ((c) - '0')
 
 #define MAXBUF (sizeof(long long int) * 8)     /* enough for binary */
 static char digs[] = "0123456789abcdef";
 
 #define isdigit(d) ((d) >= '0' && (d) <= '9')
 #define Ctod(c) ((c) - '0')
 
 #define MAXBUF (sizeof(long long int) * 8)     /* enough for binary */
 static char digs[] = "0123456789abcdef";
 
-
 #if CONFIG_NO_PRINTF_STRINGS
 /* Prevent CPP from breaking the definition below */
 #undef printf
 #if CONFIG_NO_PRINTF_STRINGS
 /* Prevent CPP from breaking the definition below */
 #undef printf
@@ -762,22 +756,12 @@ conslog_putc(
 #endif
 }
 
 #endif
 }
 
-#if    MACH_KDB
-extern void db_putchar(char c);
-#endif
-
 void
 void
-dbugprintf(__unused const char *fmt, ...)
+cons_putc_locked(
+       char c)
 {
 {
-
-#if    MACH_KDB
-       va_list listp;
-
-       va_start(listp, fmt);
-       _doprnt(fmt, &listp, db_putchar, 16);
-       va_end(listp);
-#endif
-       return;
+       if ((debug_mode && !disable_debug_output) || !disableConsoleOutput)
+               cnputc(c);
 }
 
 int
 }
 
 int
@@ -860,6 +844,8 @@ kdb_printf_unbuffered(const char *fmt, ...)
        return 0;
 }
 
        return 0;
 }
 
+#if !CONFIG_EMBEDDED
+
 static void
 copybyte(int c, void *arg)
 {
 static void
 copybyte(int c, void *arg)
 {
@@ -891,3 +877,4 @@ sprintf(char *buf, const char *fmt, ...)
        *copybyte_str = '\0';
         return (int)strlen(buf);
 }
        *copybyte_str = '\0';
         return (int)strlen(buf);
 }
+#endif /* !CONFIG_EMBEDDED */