X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/b0d623f7f2ae71ed96e60569f61f9a9a27016e80..bd504ef0e0b883cdd7917b73b3574eb9ce669905:/osfmk/kern/printf.c diff --git a/osfmk/kern/printf.c b/osfmk/kern/printf.c index fd04f883a..88813d844 100644 --- a/osfmk/kern/printf.c +++ b/osfmk/kern/printf.c @@ -155,7 +155,6 @@ */ #include -#include #include #include #include @@ -172,17 +171,12 @@ #endif #include -#ifdef __ppc__ -#include -#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"; - #if CONFIG_NO_PRINTF_STRINGS /* Prevent CPP from breaking the definition below */ #undef printf @@ -762,22 +756,12 @@ conslog_putc( #endif } -#if MACH_KDB -extern void db_putchar(char c); -#endif - 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 @@ -860,6 +844,8 @@ kdb_printf_unbuffered(const char *fmt, ...) return 0; } +#if !CONFIG_EMBEDDED + static void copybyte(int c, void *arg) { @@ -891,3 +877,4 @@ sprintf(char *buf, const char *fmt, ...) *copybyte_str = '\0'; return (int)strlen(buf); } +#endif /* !CONFIG_EMBEDDED */