X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvmm_sprintf.c;h=c573e3ae62d6ea1359464550a7316445f72cf9b4;hb=3a4e54ec208ea3589963b410d2d73292bbc4a8fe;hp=cc8b79e5b6824d8051ec3188f5c52876eafe4cd3;hpb=4c0aeefed7dec96dd1f70c2f8f3cc3db45abb621;p=palacios.git diff --git a/palacios/src/palacios/vmm_sprintf.c b/palacios/src/palacios/vmm_sprintf.c index cc8b79e..c573e3a 100644 --- a/palacios/src/palacios/vmm_sprintf.c +++ b/palacios/src/palacios/vmm_sprintf.c @@ -86,6 +86,14 @@ struct snprintf_arg { }; + +#if defined(CONFIG_BUILT_IN_STDIO) && \ + ( defined(CONFIG_BUILT_IN_SPRINTF) || \ + defined(CONFIG_BUILT_IN_SNPRINTF) || \ + defined(CONFIG_BUILT_IN_VSPRINTF) || \ + defined(CONFIG_BUILT_IN_VSNPRINTF) || \ + defined(CONFIG_BUILT_IN_VSNRPRINTF )) + static char * ksprintn(char * nbuf, uint64_t num, int base, int *len, int upper); static void snprintf_func(int ch, void * arg); static int kvprintf(char const * fmt, void (*func)(int, void *), void * arg, int radix, va_list ap); @@ -545,6 +553,8 @@ number: } +#endif // CONFIG_BUILT_IN_STDIO + void v3_hexdump(const void * ptr, int length, const char * hdr, int flags) { @@ -566,35 +576,35 @@ void v3_hexdump(const void * ptr, int length, const char * hdr, int flags) { cp = ptr; for (i = 0; i < length; i+= cols) { if (hdr != NULL) - PrintDebug("%s", hdr); + V3_Print("%s", hdr); if ((flags & HD_OMIT_COUNT) == 0) - PrintDebug("%04x ", i); + V3_Print("%04x ", i); if ((flags & HD_OMIT_HEX) == 0) { for (j = 0; j < cols; j++) { k = i + j; if (k < length) - PrintDebug("%c%02x", delim, cp[k]); + V3_Print("%c%02x", delim, cp[k]); else - PrintDebug(" "); + V3_Print(" "); } } if ((flags & HD_OMIT_CHARS) == 0) { - PrintDebug(" |"); + V3_Print(" |"); for (j = 0; j < cols; j++) { k = i + j; if (k >= length) - PrintDebug(" "); + V3_Print(" "); else if (cp[k] >= ' ' && cp[k] <= '~') - PrintDebug("%c", cp[k]); + V3_Print("%c", cp[k]); else - PrintDebug("."); + V3_Print("."); } - PrintDebug("|"); + V3_Print("|"); } - PrintDebug("\n"); + V3_Print("\n"); } }