diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-09-01 00:26:37 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-09-01 00:26:37 +0000 |
commit | 5d7c1ab348722edfff7f71c30b9fe6bef8b56fa0 (patch) | |
tree | 3bbf2fe893cea2fca70b52e6143fc992fff59686 /nuttx/lib/stdio | |
parent | b351b752486c1693392faed106a8a77609006656 (diff) | |
download | px4-nuttx-5d7c1ab348722edfff7f71c30b9fe6bef8b56fa0.tar.gz px4-nuttx-5d7c1ab348722edfff7f71c30b9fe6bef8b56fa0.tar.bz2 px4-nuttx-5d7c1ab348722edfff7f71c30b9fe6bef8b56fa0.zip |
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
Diffstat (limited to 'nuttx/lib/stdio')
-rw-r--r-- | nuttx/lib/stdio/lib_perror.c | 35 |
1 files changed, 2 insertions, 33 deletions
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 } + |