summaryrefslogtreecommitdiff
path: root/nuttx/fs
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-03-12 21:53:18 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-03-12 21:53:18 +0000
commit177f3484f71b2d03fc5b809a024ff32d137494ba (patch)
treec1c81390b64b5e303bad0ea2638d979d9c2e8607 /nuttx/fs
parenteb1679e6fac9aa613baf90f285ef3e5e5413ea18 (diff)
downloadpx4-nuttx-177f3484f71b2d03fc5b809a024ff32d137494ba.tar.gz
px4-nuttx-177f3484f71b2d03fc5b809a024ff32d137494ba.tar.bz2
px4-nuttx-177f3484f71b2d03fc5b809a024ff32d137494ba.zip
Fix some ARMv7-M syscall logic
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5736 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/fs')
-rw-r--r--nuttx/fs/fs_fdopen.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/nuttx/fs/fs_fdopen.c b/nuttx/fs/fs_fdopen.c
index 0e43876a1..58ea043c5 100644
--- a/nuttx/fs/fs_fdopen.c
+++ b/nuttx/fs/fs_fdopen.c
@@ -144,6 +144,7 @@ FAR struct file_struct *fs_fdopen(int fd, int oflags, FAR struct tcb_s *tcb)
{
tcb = sched_self();
}
+
DEBUGASSERT(tcb && tcb->group);
/* Verify that this is a valid file/socket descriptor and that the
@@ -192,7 +193,11 @@ FAR struct file_struct *fs_fdopen(int fd, int oflags, FAR struct tcb_s *tcb)
/* Get the stream list from the TCB */
+#if defined(CONFIG_NUTTX_KERNEL) && defined(CONFIG_MM_KERNEL_HEAP)
+ slist = tcb->group->tg_streamlist;
+#else
slist = &tcb->group->tg_streamlist;
+#endif
/* Find an unallocated FILE structure in the stream list */