Add perror()
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5061 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
9019c148da
commit
0924661c3e
@ -289,5 +289,5 @@
|
|||||||
threds to no more than 3 of each priority. Bad things happen
|
threds to no more than 3 of each priority. Bad things happen
|
||||||
when the existing logic tried to created several hundred test
|
when the existing logic tried to created several hundred test
|
||||||
treads!
|
treads!
|
||||||
|
* apps/nshlib/nsh.h: Both CONFIG_LIBC_STRERROR and CONFIG_NSH_STRERROR
|
||||||
|
must be defined to use strerror() with NSH.
|
||||||
|
@ -148,9 +148,12 @@ config NSH_FILEIOSIZE
|
|||||||
config NSH_STRERROR
|
config NSH_STRERROR
|
||||||
bool "Use strerror()"
|
bool "Use strerror()"
|
||||||
default n
|
default n
|
||||||
|
depends on LIBC_STRERROR
|
||||||
---help---
|
---help---
|
||||||
strerror(errno) makes more readable output but strerror() is
|
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 LIBC_STRERROR.
|
||||||
|
|
||||||
config NSH_LINELEN
|
config NSH_LINELEN
|
||||||
int "Max command line length"
|
int "Max command line length"
|
||||||
|
@ -915,7 +915,9 @@ NSH-Specific Configuration Settings
|
|||||||
|
|
||||||
* CONFIG_NSH_STRERROR
|
* CONFIG_NSH_STRERROR
|
||||||
strerror(errno) makes more readable output but strerror() is
|
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
|
* CONFIG_NSH_LINELEN
|
||||||
The maximum length of one command line and of one output line.
|
The maximum length of one command line and of one output line.
|
||||||
|
@ -238,9 +238,14 @@
|
|||||||
#define NSH_MAX_ARGUMENTS 6
|
#define NSH_MAX_ARGUMENTS 6
|
||||||
|
|
||||||
/* strerror() produces much nicer output but is, however, quite large and
|
/* 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
|
#ifdef CONFIG_NSH_STRERROR
|
||||||
# define NSH_ERRNO strerror(errno)
|
# define NSH_ERRNO strerror(errno)
|
||||||
# define NSH_ERRNO_OF(err) strerror(err)
|
# define NSH_ERRNO_OF(err) strerror(err)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user