diff --git a/utils.c b/utils.c index 45b10b0..8c86410 100644 --- a/utils.c +++ b/utils.c @@ -16,6 +16,8 @@ Copyright (C) 2008, 2009 Hector Martin "marcan" #include "gpio.h" #include "hollywood.h" +#include + #ifndef LOADER static char ascii(char s) { if(s < 0x20) return '.'; @@ -40,6 +42,17 @@ void hexdump(void *d, int len) { gecko_printf("\n"); } } + +int sprintf(char *buffer, const char *fmt, ...) +{ + va_list args; + int i; + + va_start(args, fmt); + i = vsprintf(buffer, fmt, args); + va_end(args); + return i; +} #endif void udelay(u32 d)