summaryrefslogtreecommitdiff
path: root/nuttx/fs/fat
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-01-15 21:01:37 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-01-15 21:01:37 +0000
commit9cc7477faf3e49678aa827a6bc1ab99e2812c4d8 (patch)
treea84eb181060b4367ba7278a829a2ce7f3a83ffa9 /nuttx/fs/fat
parentfa14e61b3b4bca193293aba75f7ee106cbe4dd69 (diff)
downloadpx4-nuttx-9cc7477faf3e49678aa827a6bc1ab99e2812c4d8.tar.gz
px4-nuttx-9cc7477faf3e49678aa827a6bc1ab99e2812c4d8.tar.bz2
px4-nuttx-9cc7477faf3e49678aa827a6bc1ab99e2812c4d8.zip
Implement redirection of output from NSH builtin commands to a file in a mounted volume
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5521 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/fs/fat')
-rw-r--r--nuttx/fs/fat/fs_fat32.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/nuttx/fs/fat/fs_fat32.c b/nuttx/fs/fat/fs_fat32.c
index 7164a9f8f..c10c28a5c 100644
--- a/nuttx/fs/fat/fs_fat32.c
+++ b/nuttx/fs/fat/fs_fat32.c
@@ -1314,15 +1314,16 @@ static int fat_dup(FAR const struct file *oldp, FAR struct file *newp)
* file is re-opened.
*/
- newff->ff_bflags = 0;
- newff->ff_oflags = oldff->ff_oflags;
- newff->ff_sectorsincluster = oldff->ff_sectorsincluster;
- newff->ff_dirindex = oldff->ff_dirindex;
- newff->ff_currentcluster = oldff->ff_currentcluster;
- newff->ff_dirsector = oldff->ff_dirsector;
- newff->ff_size = oldff->ff_size;
- newff->ff_currentsector = 0;
- newff->ff_cachesector = 0;
+ newff->ff_bflags = 0; /* File buffer flags */
+ newff->ff_oflags = oldff->ff_oflags; /* File open flags */
+ newff->ff_sectorsincluster = oldff->ff_sectorsincluster; /* Sectors remaining in cluster */
+ newff->ff_dirindex = oldff->ff_dirindex; /* Index to directory entry */
+ newff->ff_currentcluster = oldff->ff_currentcluster; /* Current cluster */
+ newff->ff_dirsector = oldff->ff_dirsector; /* Sector containing directory entry */
+ newff->ff_size = oldff->ff_size; /* Size of the file */
+ newff->ff_startcluster = oldff->ff_startcluster; /* Start cluster of file on media */
+ newff->ff_currentsector = oldff->ff_currentsector; /* Current sector */
+ newff->ff_cachesector = 0; /* Sector in file buffer */
/* Attach the private date to the struct file instance */