mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 16:50:55 +08:00
libs/libc/unistd/lib_getcwd.c: remove stray sched_unlock(). Also fixes several typos.
This commit is contained in:
committed by
Gregory Nutt
parent
03ad77f45c
commit
5c853cd1dc
@@ -57,7 +57,7 @@ config LIBC_PRINT_LEGACY
|
||||
---help---
|
||||
By default, printf (and friends) are implemented using a port from
|
||||
newlib-nano. That port can be signifcantly smaller, especially if
|
||||
floating support is enabled. This option may is avaiable, however,
|
||||
floating support is enabled. This option is available, however,
|
||||
to revert to the legacy printf version is so desired.
|
||||
|
||||
config LIBC_FLOATINGPOINT
|
||||
|
||||
@@ -65,8 +65,8 @@
|
||||
*
|
||||
* Input Parameters:
|
||||
* buf - a pointer to the location in which the current working directory
|
||||
* pathaname is returned.
|
||||
* size - The size in bytes avaiable at 'buf'
|
||||
* pathname is returned.
|
||||
* size - The size in bytes available at 'buf'
|
||||
*
|
||||
* Returned Value:
|
||||
* Upon successful completion, getcwd() returns the 'buf' argument.
|
||||
@@ -77,11 +77,11 @@
|
||||
* The 'size' argument is 0 or the 'buf' argument is NULL.
|
||||
* ERANGE
|
||||
* The size argument is greater than 0, but is smaller than the length
|
||||
* of the currrent working directory pathname +1.
|
||||
* of the current working directory pathname +1.
|
||||
* EACCES
|
||||
* Read or search permission was denied for a component of the pathname.
|
||||
* ENOMEM
|
||||
* Insufficient storage space is available.
|
||||
* Insufficient storage space is available.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
@@ -118,7 +118,6 @@ FAR char *getcwd(FAR char *buf, size_t size)
|
||||
/* Copy the cwd to the user buffer */
|
||||
|
||||
strcpy(buf, pwd);
|
||||
sched_unlock();
|
||||
return buf;
|
||||
}
|
||||
#endif /* !CONFIG_DISABLE_ENVIRON */
|
||||
|
||||
Reference in New Issue
Block a user