summaryrefslogtreecommitdiff
path: root/nuttx/fs/fs_fcntl.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-07-14 21:05:40 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-07-14 21:05:40 +0000
commit3044a5f0f6197f3923c1229ef1974b17284f56df (patch)
tree189259eb60c6bdc6a646e62b0eb684ae5719554d /nuttx/fs/fs_fcntl.c
parent3bfb6d9fd94c9f871eecab92a0d550ab66e5042b (diff)
downloadpx4-nuttx-3044a5f0f6197f3923c1229ef1974b17284f56df.tar.gz
px4-nuttx-3044a5f0f6197f3923c1229ef1974b17284f56df.tar.bz2
px4-nuttx-3044a5f0f6197f3923c1229ef1974b17284f56df.zip
Clean-up files in fs/ directory
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4942 42af7a65-404d-4744-a932-0658087f49c3
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;