diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-08-28 19:01:14 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-08-28 19:01:14 +0000 |
commit | 96c66099109df5198d95ed32b5278bb574f4c8e5 (patch) | |
tree | acd75c9f9d73075b8a1beef2a26e939f63ae353c /nuttx/Documentation/NuttxPortingGuide.html | |
parent | a9ead1328ee2c67363e580946564c80ed91d96ff (diff) | |
download | px4-nuttx-96c66099109df5198d95ed32b5278bb574f4c8e5.tar.gz px4-nuttx-96c66099109df5198d95ed32b5278bb574f4c8e5.tar.bz2 px4-nuttx-96c66099109df5198d95ed32b5278bb574f4c8e5.zip |
Add perror()
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5061 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/Documentation/NuttxPortingGuide.html')
-rw-r--r-- | nuttx/Documentation/NuttxPortingGuide.html | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/nuttx/Documentation/NuttxPortingGuide.html b/nuttx/Documentation/NuttxPortingGuide.html index 78c1327e2..a0f23e1e8 100644 --- a/nuttx/Documentation/NuttxPortingGuide.html +++ b/nuttx/Documentation/NuttxPortingGuide.html @@ -12,7 +12,7 @@ <h1><big><font color="#3c34ec"> <i>NuttX RTOS Porting Guide</i> </font></big></h1> - <p>Last Updated: July 8, 2012</p> + <p>Last Updated: August 28, 2012</p> </td> </tr> </table> @@ -4350,6 +4350,31 @@ build <code>CONFIG_LIBC_FLOATINGPOINT</code>: By default, floating point support in <code>printf</code>, <code>sscanf</code>, etc. is disabled. </li> + <li> + <code>CONFIG_LIBC_STRERROR</code>: + <code>strerror()</code> is useful because it decodes <code>errno</code> values into a human readable strings. + But it can also require a lot of memory to store the strings. + If this option is selected, <code>strerror()</code> will still exist in the build but it will not decode error values. + This option should be used by other logic to decide if it should use <code>strerror()</code> or not. + For example, the NSH application will not use <code>strerror()</code> if this option is not selected; + <code>perror(</code>) will not use strerror() is this option is not selected (see also <code>CONFIG_NSH_STRERROR</code>). + </li> + <li> + <code>CONFIG_LIBC_STRERROR_SHORT</code>: + If this option is selected, then <code>strerror()</code> will use a shortened string when it decodes the error. + Specifically, <code>strerror()</code> is simply use the string that is the common name for the error. + For example, the <code>errno</code> value of 2 will produce the string "No such file or directory" is <code>CONFIG_LIBC_STRERROR_SHORT</code> is not defined but the string "ENOENT" is <code>CONFIG_LIBC_STRERROR_SHORT</code> is defined. + </li> + <li> + <code>CONFIG_LIBC_PERROR_STDOUT</code>: + POSIX requires that <code>perror()</code> provide its output on <code>stderr</code>. + This option may be defined, however, to provide <code>perror()</code> output that is serialized with other <code>stdout</code> messages. + </li> + <li> + <code>CONFIG_LIBC_PERROR_DEVNAME</code>: + Another non-standard option is to provide <code>perror()</code> output to a logging device or file. + <code>CONFIG_LIBC_PERROR_DEVNAME<code> may be defined to be any write-able, character device (or file). + </li> </ul> <h2>Allow for architecture optimized implementations</h2> |