diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-11-20 20:32:33 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-11-20 20:32:33 +0000 |
commit | 78dd0de872d9bef518f3ef395b4913197e1b2077 (patch) | |
tree | 0af928d900e8e43c520f6b06248eb84177b6a56e /nuttx/fs/fs_write.c | |
parent | 93c4e0321431ad4164eb37c26c532d187d0aa1ab (diff) | |
download | px4-nuttx-78dd0de872d9bef518f3ef395b4913197e1b2077.tar.gz px4-nuttx-78dd0de872d9bef518f3ef395b4913197e1b2077.tar.bz2 px4-nuttx-78dd0de872d9bef518f3ef395b4913197e1b2077.zip |
Several webserver bugs fixed
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@391 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/fs/fs_write.c')
-rw-r--r-- | nuttx/fs/fs_write.c | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/nuttx/fs/fs_write.c b/nuttx/fs/fs_write.c index b0d523a45..ea5b5dc0a 100644 --- a/nuttx/fs/fs_write.c +++ b/nuttx/fs/fs_write.c @@ -1,5 +1,5 @@ -/************************************************************ - * fs_write.c +/**************************************************************************** + * fs/fs_write.c * * Copyright (C) 2007 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> @@ -31,15 +31,15 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Compilation Switches - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include <nuttx/config.h> #include <sys/types.h> @@ -54,11 +54,11 @@ #include "fs_internal.h" -/************************************************************ +/**************************************************************************** * Global Functions - ************************************************************/ + ****************************************************************************/ -/**************************************************************************** +/******************************************************************************************** * Function: send * * Description: @@ -106,15 +106,17 @@ * * Assumptions: * - ****************************************************************************/ + ********************************************************************************************/ int write(int fd, const void *buf, unsigned int nbytes) { +#if CONFIG_NFILE_DESCRIPTORS > 0 FAR struct filelist *list; FAR struct file *this_file; FAR struct inode *inode; - int err; int ret; +#endif + int err; /* Did we get a valid file descriptor? */ @@ -135,6 +137,8 @@ int write(int fd, const void *buf, unsigned int nbytes) } } +#if CONFIG_NFILE_DESCRIPTORS > 0 + /* Get the thread-specific file list */ list = sched_getfiles(); @@ -172,6 +176,7 @@ int write(int fd, const void *buf, unsigned int nbytes) } return ret; +#endif errout: *get_errno_ptr() = err; |