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/globalvar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common/globalvar.c') diff --git a/common/globalvar.c b/common/globalvar.c index d5dd461963..bc1734d58d 100644 --- a/common/globalvar.c +++ b/common/globalvar.c @@ -51,7 +51,7 @@ static int nv_save(const char *name, const char *val) if (fd < 0) return fd; - fprintf(fd, "%s", val); + dprintf(fd, "%s", val); close(fd); -- cgit v1.2.3