diff options
author | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2012-08-28 19:01:14 +0000 |
---|---|---|
committer | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2012-08-28 19:01:14 +0000 |
commit | f53d3ecc71d0475d8b2c322310a76e6f5ca735ea (patch) | |
tree | acd75c9f9d73075b8a1beef2a26e939f63ae353c /apps/nshlib | |
parent | bbe3db55f26c2aef2f2ba27bf726bee1ec039b24 (diff) | |
download | px4-firmware-f53d3ecc71d0475d8b2c322310a76e6f5ca735ea.tar.gz px4-firmware-f53d3ecc71d0475d8b2c322310a76e6f5ca735ea.tar.bz2 px4-firmware-f53d3ecc71d0475d8b2c322310a76e6f5ca735ea.zip |
Add perror()
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5061 7fd9a85b-ad96-42d3-883c-3090e2eb8679
Diffstat (limited to 'apps/nshlib')
-rw-r--r-- | apps/nshlib/Kconfig | 3 | ||||
-rw-r--r-- | apps/nshlib/README.txt | 4 | ||||
-rw-r--r-- | apps/nshlib/nsh.h | 7 |
3 files changed, 12 insertions, 2 deletions
diff --git a/apps/nshlib/Kconfig b/apps/nshlib/Kconfig index 7e419bdde..ff692f43b 100644 --- a/apps/nshlib/Kconfig +++ b/apps/nshlib/Kconfig @@ -148,9 +148,12 @@ config NSH_FILEIOSIZE config NSH_STRERROR bool "Use strerror()" default n + depends on LIBC_STRERROR ---help--- strerror(errno) makes more readable output but strerror() is very large and will not be used unless this setting is 'y' + This setting depends upon the strerror() having been enabled + with LIBC_STRERROR. config NSH_LINELEN int "Max command line length" diff --git a/apps/nshlib/README.txt b/apps/nshlib/README.txt index d8edd8969..0f6aee759 100644 --- a/apps/nshlib/README.txt +++ b/apps/nshlib/README.txt @@ -915,7 +915,9 @@ NSH-Specific Configuration Settings * CONFIG_NSH_STRERROR strerror(errno) makes more readable output but strerror() is - very large and will not be used unless this setting is 'y' + very large and will not be used unless this setting is 'y'. + This setting depends upon the strerror() having been enabled + with CONFIG_LIBC_STRERROR. * CONFIG_NSH_LINELEN The maximum length of one command line and of one output line. diff --git a/apps/nshlib/nsh.h b/apps/nshlib/nsh.h index 439c2ffd1..dac91ba05 100644 --- a/apps/nshlib/nsh.h +++ b/apps/nshlib/nsh.h @@ -238,9 +238,14 @@ #define NSH_MAX_ARGUMENTS 6 /* strerror() produces much nicer output but is, however, quite large and - * will only be used if CONFIG_NSH_STRERROR is defined. + * will only be used if CONFIG_NSH_STRERROR is defined. Note that the strerror + * interface must also have been enabled with CONFIG_LIBC_STRERROR. */ +#ifndef CONFIG_LIBC_STRERROR +# undef CONFIG_NSH_STRERROR +#endif + #ifdef CONFIG_NSH_STRERROR # define NSH_ERRNO strerror(errno) # define NSH_ERRNO_OF(err) strerror(err) |