diff --git a/sys/boot/arm/at91/libat91/lib.h b/sys/boot/arm/at91/libat91/lib.h index fac40b1b44ff..24ac49fd3249 100644 --- a/sys/boot/arm/at91/libat91/lib.h +++ b/sys/boot/arm/at91/libat91/lib.h @@ -28,9 +28,9 @@ #define ARM_BOOT_LIB_H int getc(int); -int putchar(int); -int xputchar(int); -int printf(const char *fmt,...); +void putchar(int); +void xputchar(int); +void printf(const char *fmt,...); /* The following function write eeprom at ee_addr using data */ /* from data_add for size bytes. */ diff --git a/sys/boot/arm/at91/libat91/printf.c b/sys/boot/arm/at91/libat91/printf.c index 8175b1448ae9..f2622b859057 100644 --- a/sys/boot/arm/at91/libat91/printf.c +++ b/sys/boot/arm/at91/libat91/printf.c @@ -20,13 +20,12 @@ #include #include "lib.h" -int +void printf(const char *fmt,...) { va_list ap; const char *hex = "0123456789abcdef"; char buf[10]; - const char *fmt_orig = fmt; char *s; unsigned u; int c; @@ -67,5 +66,5 @@ printf(const char *fmt,...) } va_end(ap); - return (int)(fmt - fmt_orig); + return; } diff --git a/sys/boot/arm/at91/libat91/putchar.c b/sys/boot/arm/at91/libat91/putchar.c index ed59528f4563..2b805c98c29b 100644 --- a/sys/boot/arm/at91/libat91/putchar.c +++ b/sys/boot/arm/at91/libat91/putchar.c @@ -39,11 +39,11 @@ #include "lib.h" /* - * int putchar(int ch) + * void putchar(int ch) * Writes a character to the DBGU port. It assumes that DBGU has * already been initialized. */ -int +void putchar(int ch) { AT91PS_USART pUSART = (AT91PS_USART)AT91C_BASE_DBGU; @@ -51,14 +51,12 @@ putchar(int ch) while (!(pUSART->US_CSR & AT91C_US_TXRDY)) continue; pUSART->US_THR = (ch & 0xFF); - return (1); } -int +void xputchar(int ch) { - if (ch == '\n') - putchar('\r'); - putchar(ch); - return (ch == '\n' ? 2 : 1); + if (ch == '\n') + putchar('\r'); + putchar(ch); } diff --git a/sys/boot/arm/ixp425/boot2/ixp425_board.c b/sys/boot/arm/ixp425/boot2/ixp425_board.c index 78ca8b672fd0..c13f8ed52694 100644 --- a/sys/boot/arm/ixp425/boot2/ixp425_board.c +++ b/sys/boot/arm/ixp425/boot2/ixp425_board.c @@ -165,7 +165,7 @@ getc(int seconds) return c; } -int +void putchar(int ch) { int delay, limit; @@ -179,16 +179,14 @@ putchar(int ch) limit = 40; while ((uart_getreg(ubase, REG_LSR) & LSR_TEMT) == 0 && --limit) DELAY(delay); - return (1); } -int +void xputchar(int ch) { if (ch == '\n') putchar('\r'); putchar(ch); - return (ch == '\n' ? 2 : 1); } void diff --git a/sys/boot/arm/ixp425/boot2/lib.h b/sys/boot/arm/ixp425/boot2/lib.h index e72096005147..9c88030c2503 100644 --- a/sys/boot/arm/ixp425/boot2/lib.h +++ b/sys/boot/arm/ixp425/boot2/lib.h @@ -35,12 +35,12 @@ int main(void); void DELAY(int); int getc(int); -int putchar(int); -int xputchar(int); +void putchar(int); +void xputchar(int); void putstr(const char *); void puthex8(u_int8_t); void puthexlist(const u_int8_t *, int); -int printf(const char *fmt,...); +void printf(const char *fmt,...); void bzero(void *, size_t); char *strcpy(char *to, const char *from); diff --git a/sys/boot/i386/boot2/boot2.c b/sys/boot/i386/boot2/boot2.c index 21df3a801484..cc5d76f86dad 100644 --- a/sys/boot/i386/boot2/boot2.c +++ b/sys/boot/i386/boot2/boot2.c @@ -114,8 +114,8 @@ void exit(int); static void load(void); static int parse(void); static int dskread(void *, unsigned, unsigned); -static int printf(const char *,...); -static int putchar(int); +static void printf(const char *,...); +static void putchar(int); static int drvread(void *, unsigned, unsigned); static int keyhit(unsigned); static int xputc(int); @@ -521,12 +521,11 @@ error: return -1; } -static int +static void printf(const char *fmt,...) { va_list ap; static char buf[10]; - const char *fmt_orig = fmt; char *s; unsigned u; int c; @@ -557,16 +556,15 @@ printf(const char *fmt,...) putchar(c); } va_end(ap); - return (int)(fmt - fmt_orig); + return; } -static int +static void putchar(int c) { if (c == '\n') xputc('\r'); xputc(c); - return (c == '\n' ? 2 : 1); } static int