diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-01-15 21:01:37 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-01-15 21:01:37 +0000 |
commit | fcb316906d1741c28292e94eb7f09bd4d71ccb48 (patch) | |
tree | a84eb181060b4367ba7278a829a2ce7f3a83ffa9 /nuttx/fs/fat/fs_fat32.c | |
parent | 90a72e97d3f18a5e230578c63113da119622a73a (diff) | |
download | px4-firmware-fcb316906d1741c28292e94eb7f09bd4d71ccb48.tar.gz px4-firmware-fcb316906d1741c28292e94eb7f09bd4d71ccb48.tar.bz2 px4-firmware-fcb316906d1741c28292e94eb7f09bd4d71ccb48.zip |
Implement redirection of output from NSH builtin commands to a file in a mounted volume
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5521 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/fs/fat/fs_fat32.c')
-rw-r--r-- | nuttx/fs/fat/fs_fat32.c | 19 |
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 */ |