mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-03 01:51:35 +08:00
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
This commit is contained in:
+10
-9
@@ -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 */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user