From 5d7c1ab348722edfff7f71c30b9fe6bef8b56fa0 Mon Sep 17 00:00:00 2001 From: patacongo Date: Sat, 1 Sep 2012 00:26:37 +0000 Subject: Remove CONFIG_LIBC_PERROR_DEVNAME. What was I thinking? git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5074 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/lib/stdio/lib_perror.c | 35 ++--------------------------------- 1 file changed, 2 insertions(+), 33 deletions(-) (limited to 'nuttx/lib') diff --git a/nuttx/lib/stdio/lib_perror.c b/nuttx/lib/stdio/lib_perror.c index 3be2dd9db..867e113f9 100644 --- a/nuttx/lib/stdio/lib_perror.c +++ b/nuttx/lib/stdio/lib_perror.c @@ -53,18 +53,8 @@ #ifdef CONFIG_LIBC_PERROR_STDOUT # define PERROR_STREAM stdout -# undef CONFIG_LIBC_PERROR_DEVNAME -#endif - -/* Another non-standard option is to provide perror output to a logging - * device or file. CONFIG_LIBC_PERROR_DEVNAME may be defined to be any write- - * able, character device (or file). - */ - -#ifndef CONFIG_LIBC_PERROR_DEVNAME -# define PERROR_STREAM stderr #else -# define PERROR_STREAM perror_stream; +# define PERROR_STREAM stderr #endif /**************************************************************************** @@ -83,10 +73,6 @@ * Private Data ****************************************************************************/ -#ifdef CONFIG_LIBC_PERROR_DEVNAME -static FILE *perror_stream; -#endif - /**************************************************************************** * Private Functions ****************************************************************************/ @@ -101,24 +87,6 @@ static FILE *perror_stream; void perror(FAR const char *s) { - /* If we are using a custom output device (something other than - * /dev/console), then make sure that the device has been opened. - */ - -#ifdef CONFIG_LIBC_PERROR_DEVNAME - if (!perror_stream) - { - /* Not yet.. open it now */ - - perror_stream = fopen(CONFIG_LIBC_PERROR_DEVNAME, "w"); - if (!perror_stream) - { - /* Oops... we couldn't open the device */ - - return; - } - } -#endif /* If strerror() is not enabled, then just print the error number */ @@ -128,3 +96,4 @@ void perror(FAR const char *s) (void)fprintf(PERROR_STREAM, "%s: Error %d\n", s, errno); #endif } + -- cgit v1.2.3