fix fprintf prototype and return value
The puts functions now properly return the number of characters written. With this we can also fix fprintf. Also, remove never reached return in fputs. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
e57f57a3d0
commit
1533f6b7b3
|
@ -318,7 +318,6 @@ int fputs(int fd, const char *s)
|
|||
return eputs(s);
|
||||
else
|
||||
return write(fd, s, strlen(s));
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(fputs);
|
||||
|
||||
|
@ -333,7 +332,7 @@ void console_flush(void)
|
|||
}
|
||||
EXPORT_SYMBOL(console_flush);
|
||||
|
||||
void fprintf (int file, const char *fmt, ...)
|
||||
int fprintf(int file, const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
uint i;
|
||||
|
@ -348,7 +347,7 @@ void fprintf (int file, const char *fmt, ...)
|
|||
va_end (args);
|
||||
|
||||
/* Print the string */
|
||||
fputs (file, printbuffer);
|
||||
return fputs(file, printbuffer);
|
||||
}
|
||||
EXPORT_SYMBOL(fprintf);
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ int vscnprintf(char *buf, size_t size, const char *fmt, va_list args);
|
|||
#define stderr 2
|
||||
#define MAX_FILES 128
|
||||
|
||||
void fprintf(int file, const char *fmt, ...) __attribute__ ((format(__printf__, 2, 3)));
|
||||
int fprintf(int file, const char *fmt, ...) __attribute__ ((format(__printf__, 2, 3)));
|
||||
int fputs(int file, const char *s);
|
||||
int fputc(int file, const char c);
|
||||
int ftstc(int file);
|
||||
|
|
Loading…
Reference in New Issue