You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2020/10/28 16:11:56 UTC

[incubator-nuttx] branch master updated (1115452 -> 8c464b0)

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git.


    from 1115452  drivers/pipes: nx_pipe syscall takes three params, also use nx_close on error path
     new 1577726  fs/inode/fs_fileopen.c: use nx_close instead of close
     new 8c464b0  sched: use nx_close instead of close

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 fs/inode/fs_fileopen.c             | 2 +-
 sched/group/group_setupidlefiles.c | 7 +++----
 sched/task/task_spawnparms.c       | 6 +++---
 3 files changed, 7 insertions(+), 8 deletions(-)


[incubator-nuttx] 02/02: sched: use nx_close instead of close

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 8c464b0e7a35bf6ae94fcecdccc31dd31af9cd29
Author: Juha Niskanen <ju...@haltian.com>
AuthorDate: Wed Oct 28 17:02:56 2020 +0200

    sched: use nx_close instead of close
    
    Signed-off-by: Juha Niskanen <ju...@haltian.com>
---
 sched/group/group_setupidlefiles.c | 7 +++----
 sched/task/task_spawnparms.c       | 6 +++---
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/sched/group/group_setupidlefiles.c b/sched/group/group_setupidlefiles.c
index 6b753c5..b1a0a9d 100644
--- a/sched/group/group_setupidlefiles.c
+++ b/sched/group/group_setupidlefiles.c
@@ -66,9 +66,8 @@
  *   tcb - tcb of the idle task.
  *
  * Returned Value:
- *   None
- *
- * Assumptions:
+ *   0 is returned on success; a negated errno value is returned on a
+ *   failure.
  *
  ****************************************************************************/
 
@@ -114,7 +113,7 @@ int group_setupidlefiles(FAR struct task_tcb_s *tcb)
       if (fd > 0)
         {
           sinfo("Open /dev/console fd: %d\n", fd);
-          close(fd);
+          nx_close(fd);
         }
       else
         {
diff --git a/sched/task/task_spawnparms.c b/sched/task/task_spawnparms.c
index e7da247..3e7dffa 100644
--- a/sched/task/task_spawnparms.c
+++ b/sched/task/task_spawnparms.c
@@ -68,11 +68,11 @@ struct spawn_parms_s g_spawn_parms;
 
 static inline int nxspawn_close(FAR struct spawn_close_file_action_s *action)
 {
-  /* The return value from close() is ignored */
+  /* The return value from nx_close() is ignored */
 
   sinfo("Closing fd=%d\n", action->fd);
 
-  close(action->fd);
+  nx_close(action->fd);
   return OK;
 }
 
@@ -131,7 +131,7 @@ static inline int nxspawn_open(FAR struct spawn_open_file_action_s *action)
         }
 
       sinfo("Closing fd=%d\n", fd);
-      close(fd);
+      nx_close(fd);
     }
 
   return ret;


[incubator-nuttx] 01/02: fs/inode/fs_fileopen.c: use nx_close instead of close

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 1577726f05d7a49c95295d807cc73a0207dc176a
Author: Juha Niskanen <ju...@haltian.com>
AuthorDate: Wed Oct 28 17:02:35 2020 +0200

    fs/inode/fs_fileopen.c: use nx_close instead of close
    
    Signed-off-by: Juha Niskanen <ju...@haltian.com>
---
 fs/inode/fs_fileopen.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/inode/fs_fileopen.c b/fs/inode/fs_fileopen.c
index a7b6aa6..90a13c1 100644
--- a/fs/inode/fs_fileopen.c
+++ b/fs/inode/fs_fileopen.c
@@ -102,7 +102,7 @@ int file_open(FAR struct file *filep, FAR const char *path, int oflags, ...)
   ret = file_detach(fd, filep);
   if (ret < 0)
     {
-      close(fd);
+      nx_close(fd);
       return ret;
     }