From ae88b2079b49f803947d60fb094f60d2a7522a25 Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 13 Apr 2011 22:47:04 +0000 Subject: Fix error in strrch() git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3501 42af7a65-404d-4744-a932-0658087f49c3 --- apps/nshlib/nsh_envcmds.c | 3 ++- nuttx/ChangeLog | 5 +++++ nuttx/Documentation/NuttX.html | 22 +++++++++++++++++++++- nuttx/README.txt | 33 +++++++++++++++++++++++++++++++++ nuttx/lib/string/lib_strrchr.c | 2 +- 5 files changed, 62 insertions(+), 3 deletions(-) diff --git a/apps/nshlib/nsh_envcmds.c b/apps/nshlib/nsh_envcmds.c index c452668f3..520dd76e7 100644 --- a/apps/nshlib/nsh_envcmds.c +++ b/apps/nshlib/nsh_envcmds.c @@ -240,7 +240,8 @@ int cmd_cd(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) /* Set the new workding directory */ - if (chdir(path) != 0) + ret = chdir(path); + if (ret != 0) { nsh_output(vtbl, g_fmtcmdfailed, argv[0], "chdir", NSH_ERRNO); ret = ERROR; diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index c4222df07..954517e04 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -1687,5 +1687,10 @@ * arch/arm/src/lpc17xx: Correct some typos/bugs in configuration of LPC17xx UART2 and UART3. + * nuttx/clock.h: Replace all references to the global variable g_system_timer + with clock_systemtimer() (currently just a macro that that returns g_system_timer). + * lin/string/strrch.c: Would fail if the searched-for character were the first + character in the string. + diff --git a/nuttx/Documentation/NuttX.html b/nuttx/Documentation/NuttX.html index 141b27929..47fd194b7 100644 --- a/nuttx/Documentation/NuttX.html +++ b/nuttx/Documentation/NuttX.html @@ -8,7 +8,7 @@

NuttX RTOS

-

Last Updated: April 10, 2011

+

Last Updated: April 13, 2011

@@ -2204,6 +2204,26 @@ nuttx-6.2 2011-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr> * Makefile: Fix an error introduced in the top-level Makefile in NuttX-6.1. This error only shows up if you have a /tftpboot directory. Then the make will fail with an obscure error about not being able to stat pass2. + * configs/lpcxpresso-lpc1768/nsh: Add an NSH configuration for the + LPCXpresso board. + * configs/*/ld.script: Removed 'sh_link not set for section .ARM.edix' for + a few of the builds. In you have this warning, it can be removed with the + following change to the ld.script file: + + + __exidx_start = ABSOLUTE(.); + .ARM.exidx : { + - __exidx_start = ABSOLUTE(.); + *(.ARM.exidx*) + - __exidx_end = ABSOLUTE(.); + } >sram + + __exidx_end = ABSOLUTE(.); + + * arch/arm/src/lpc17xx: Correct some typos/bugs in configuration of LPC17xx + UART2 and UART3. + * nuttx/clock.h: Replace all references to the global variable g_system_timer + with clock_systemtimer() (currently just a macro that that returns g_system_timer). + * lin/string/strrch.c: Would fail if the searched-for character were the first + character in the string. apps-6.1 2011-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr> diff --git a/nuttx/README.txt b/nuttx/README.txt index 7b149a06f..41d18f5de 100755 --- a/nuttx/README.txt +++ b/nuttx/README.txt @@ -51,6 +51,39 @@ Download and Unpack: match the various instructions in the documentation and some scripts in the source tree. +Semi-Optional apps/ package. + + All NuttX libraries and example code used to be in included within + the NuttX source tree. As of NuttX-6.0, this application code was + moved into a separate tarball, the apps tarball. If you are just + beginning with NuttX, then you will want to download the versioned + apps tarball along with the NuttX tarball. If you already have your + own product application directory, then you may not need the apps + tarball. + + It is call "Semi-optional" because if you don't have some apps/ + directory, NuttX will *fail* to build! + + Download the unpack the apps tarball in the same directly where you + unpacked the NuttX tarball. After you unpack the apps tarball, you + will have a new directory called apps-versioin (where the version + should exactly match the version of the NuttX tarball). Again, you + might want to rename the directory to simply apps/ to match what + you read in the documentation + + After unpacking the apps tarball, you will have two directories side + by side like this: + + | + +----+----+ + | | + nuttx/ apps/ + + This is important because the NuttX build will expect to find the + apps directory in that (default) location. )That default location + can be changed by editting your NuttX configuration file, but that + is another story). + Installation Directories with Spaces in the Path The nuttx build directory should reside in a path that contains no diff --git a/nuttx/lib/string/lib_strrchr.c b/nuttx/lib/string/lib_strrchr.c index c80542341..e89b26d52 100644 --- a/nuttx/lib/string/lib_strrchr.c +++ b/nuttx/lib/string/lib_strrchr.c @@ -54,7 +54,7 @@ char *strrchr(const char *s, int c) if (s) { const char *p = &s[strlen(s) - 1]; - for (; p > s; p--) + for (; p >= s; p--) { if (*p == c) { -- cgit v1.2.3