From 5559bfd2719f0b0795a6ce66b859d879271bb1e4 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Thu, 14 Apr 2016 09:37:28 +0200 Subject: stdio: Replace FILE functions with filedescriptor functions We have defined stdin, stdout and stderr as integer file descriptors, but normally they should be FILE *. Also fprintf, fputc and fputs take file descriptors instead of FILE *. As FILE * are inconvenient in the barebox environment replace the f* functions with the corresponding d* functions. dprintf is POSIX conform whereas dputc and dputs are barebox specific, but do not conflict with any stdc function. fgetc is unused and can be removed without replacing it. Signed-off-by: Sascha Hauer --- common/console.c | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'common/console.c') diff --git a/common/console.c b/common/console.c index 37574b9b01..a67f169b42 100644 --- a/common/console.c +++ b/common/console.c @@ -382,16 +382,6 @@ int getchar(void) } EXPORT_SYMBOL(getchar); -int fgetc(int fd) -{ - char c; - - if (!fd) - return getchar(); - return read(fd, &c, 1); -} -EXPORT_SYMBOL(fgetc); - int tstc(void) { return kfifo_len(console_input_fifo) || tstc_raw(); -- cgit v1.2.3