From 802917f3734093a89e4c8a36753670b82c0814da Mon Sep 17 00:00:00 2001 From: =?utf8?q?Janosch=20Gr=C3=A4f?= Date: Wed, 24 Dec 2008 17:24:24 +0100 Subject: [PATCH] stdlibc: \!perror() --- apps/include/stdio.h | 2 +- apps/lib/stdlibc/stdio.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/include/stdio.h b/apps/include/stdio.h index 6c0b44a..8164d4f 100644 --- a/apps/include/stdio.h +++ b/apps/include/stdio.h @@ -258,7 +258,7 @@ static __inline__ size_t fread(void *ptr,size_t size,size_t nitems,FILE *stream) * @param str Additional error text (can be NULL) */ static __inline__ void perror(const char *str) { - fprintf(stderr,"%s; %s\n",strerror(errno),str!=NULL?str:""); + fprintf(stderr,"%s: %s\n",str!=NULL?str:"",strerror(errno)); } diff --git a/apps/lib/stdlibc/stdio.c b/apps/lib/stdlibc/stdio.c index c2a9a44..1ffaa1a 100644 --- a/apps/lib/stdlibc/stdio.c +++ b/apps/lib/stdlibc/stdio.c @@ -28,6 +28,8 @@ #define check_stream(stream) ((stream)!=NULL && (stream)->fh>=0) +//#define _STDIO_DEBUG + static FILE *create_stream(int fh,int oflag) { FILE *stream = malloc(sizeof(FILE)); stream->fh = fh; -- 2.11.4.GIT