diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-09-16 17:46:25 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-09-16 17:46:25 +0000 |
commit | 4077a70fc256a7dd65febe986f176b8ac62091fc (patch) | |
tree | 6f0e34d559c8fa2f07c686043df3494cd7fdcff2 /nuttx/fs/fs_close.c | |
parent | 42027d080b72b8198072e7dc3933d8b70b6b40a5 (diff) | |
download | px4-nuttx-4077a70fc256a7dd65febe986f176b8ac62091fc.tar.gz px4-nuttx-4077a70fc256a7dd65febe986f176b8ac62091fc.tar.bz2 px4-nuttx-4077a70fc256a7dd65febe986f176b8ac62091fc.zip |
Add basic structure to support netdevice ioctls
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@344 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/fs/fs_close.c')
-rw-r--r-- | nuttx/fs/fs_close.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/nuttx/fs/fs_close.c b/nuttx/fs/fs_close.c index 5a63ba6a9..c1f3322cc 100644 --- a/nuttx/fs/fs_close.c +++ b/nuttx/fs/fs_close.c @@ -79,13 +79,15 @@ int close(int fd) { + int err; +#if CONFIG_NFILE_DESCRIPTORS > 0 FAR struct filelist *list; FAR struct inode *inode; - int err; /* Did we get a valid file descriptor? */ if ((unsigned int)fd >= CONFIG_NFILE_DESCRIPTORS) +#endif { /* Close a socket descriptor */ @@ -101,6 +103,8 @@ int close(int fd) goto errout; } } + +#if CONFIG_NFILE_DESCRIPTORS > 0 /* Get the thread-specific file list */ list = sched_getfiles(); @@ -154,6 +158,7 @@ int close(int fd) inode_release(inode); return OK; +#endif errout: *get_errno_ptr() = err; |