X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=common%2Fconsole.c;h=8c650e05e1c352ff5406b576387cb25dd2f5dd35;hb=7fb3e7a2d64b902e423c9e5a3aedc1f4179ac27d;hp=b09b7d15dbc83ceda10fdf2ce5489591d56094c8;hpb=953b7e629198fe2eb0adf272fb9140f2a4a51826;p=u-boot diff --git a/common/console.c b/common/console.c index b09b7d15db..8c650e05e1 100644 --- a/common/console.c +++ b/common/console.c @@ -201,7 +201,7 @@ static inline void console_doenv(int file, struct stdio_dev *dev) /** U-Boot INITIAL CONSOLE-NOT COMPATIBLE FUNCTIONS *************************/ -void serial_printf(const char *fmt, ...) +int serial_printf(const char *fmt, ...) { va_list args; uint i; @@ -216,6 +216,7 @@ void serial_printf(const char *fmt, ...) va_end(args); serial_puts(printbuffer); + return i; } int fgetc(int file) @@ -269,7 +270,7 @@ void fputs(int file, const char *s) console_puts(file, s); } -void fprintf(int file, const char *fmt, ...) +int fprintf(int file, const char *fmt, ...) { va_list args; uint i; @@ -285,6 +286,7 @@ void fprintf(int file, const char *fmt, ...) /* Send to desired file */ fputs(file, printbuffer); + return i; } /** U-Boot INITIAL CONSOLE-COMPATIBLE FUNCTION *****************************/ @@ -363,7 +365,7 @@ void puts(const char *s) } } -void printf(const char *fmt, ...) +int printf(const char *fmt, ...) { va_list args; uint i; @@ -379,9 +381,10 @@ void printf(const char *fmt, ...) /* Print the string */ puts(printbuffer); + return i; } -void vprintf(const char *fmt, va_list args) +int vprintf(const char *fmt, va_list args) { uint i; char printbuffer[CONFIG_SYS_PBSIZE]; @@ -393,6 +396,7 @@ void vprintf(const char *fmt, va_list args) /* Print the string */ puts(printbuffer); + return i; } /* test if ctrl-c was pressed */ @@ -475,7 +479,7 @@ inline void dbg(const char *fmt, ...) /** U-Boot INIT FUNCTIONS *************************************************/ -struct stdio_dev *search_device(int flags, char *name) +struct stdio_dev *search_device(int flags, const char *name) { struct stdio_dev *dev; @@ -487,7 +491,7 @@ struct stdio_dev *search_device(int flags, char *name) return NULL; } -int console_assign(int file, char *devname) +int console_assign(int file, const char *devname) { int flag; struct stdio_dev *dev;