aboutsummaryrefslogtreecommitdiff
path: root/nuttx/fs/fs_fcntl.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2012-07-14 21:05:40 +0000
committerpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2012-07-14 21:05:40 +0000
commit7c6185ae4bfefb70c17e75219db7269c03c7fd79 (patch)
tree189259eb60c6bdc6a646e62b0eb684ae5719554d /nuttx/fs/fs_fcntl.c
parent1faee63c00cf63807dea0681a8ee48104e0765f5 (diff)
downloadpx4-firmware-7c6185ae4bfefb70c17e75219db7269c03c7fd79.tar.gz
px4-firmware-7c6185ae4bfefb70c17e75219db7269c03c7fd79.tar.bz2
px4-firmware-7c6185ae4bfefb70c17e75219db7269c03c7fd79.zip
Clean-up files in fs/ directory
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4942 7fd9a85b-ad96-42d3-883c-3090e2eb8679
Diffstat (limited to 'nuttx/fs/fs_fcntl.c')
-rw-r--r--nuttx/fs/fs_fcntl.c29
1 files changed, 19 insertions, 10 deletions
diff --git a/nuttx/fs/fs_fcntl.c b/nuttx/fs/fs_fcntl.c
index b7e688895..ff53b0f20 100644
--- a/nuttx/fs/fs_fcntl.c
+++ b/nuttx/fs/fs_fcntl.c
@@ -53,6 +53,10 @@
* Private Functions
****************************************************************************/
+/****************************************************************************
+ * Name: file_vfcntl
+ ****************************************************************************/
+
#if CONFIG_NFILE_DESCRIPTORS > 0
static inline int file_vfcntl(int fildes, int cmd, va_list ap)
{
@@ -112,8 +116,8 @@ static inline int file_vfcntl(int fildes, int cmd, va_list ap)
* successful execution of one of the exec functions.
*/
- err = ENOSYS;
- break;
+ err = ENOSYS;
+ break;
case F_GETFL:
/* Get the file status flags and file access modes, defined in <fcntl.h>,
@@ -158,8 +162,8 @@ static inline int file_vfcntl(int fildes, int cmd, va_list ap)
* fildes does not refer to a socket, the results are unspecified.
*/
- err = EBADF; /* Only valid on socket descriptors */
- break;
+ err = EBADF; /* Only valid on socket descriptors */
+ break;
case F_GETLK:
/* Get the first lock which blocks the lock description pointed to by the third
@@ -188,20 +192,21 @@ static inline int file_vfcntl(int fildes, int cmd, va_list ap)
* not be done.
*/
- err = ENOSYS; /* Not implemented */
- break;
+ err = ENOSYS; /* Not implemented */
+ break;
default:
- err = EINVAL;
- break;
- }
+ err = EINVAL;
+ break;
+ }
errout:
if (err != 0)
{
- errno = err;
+ set_errno(err);
return ERROR;
}
+
return ret;
}
#endif /* CONFIG_NFILE_DESCRIPTORS > 0 */
@@ -210,6 +215,10 @@ errout:
* Global Functions
****************************************************************************/
+/****************************************************************************
+ * Name: fcntl
+ ****************************************************************************/
+
int fcntl(int fildes, int cmd, ...)
{
va_list ap;