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 2023/01/09 14:46:36 UTC

[nuttx] branch master updated: sem_unlink: return ENOENT when the named semaphore does not exist.

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/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new a491d07061 sem_unlink: return ENOENT when the named semaphore does not exist.
a491d07061 is described below

commit a491d07061e7f4950266472e7afb948eb457bf8e
Author: wangbowen6 <wa...@xiaomi.com>
AuthorDate: Mon Jan 9 12:16:45 2023 +0800

    sem_unlink: return ENOENT when the named semaphore does not exist.
    
    Follow posix, return ENOENT when the named semaphore does not
    exist to fix the ltp open posix sem_unlink 4-1.c test problem.
    
    Signed-off-by: wangbowen6 <wa...@xiaomi.com>
---
 fs/semaphore/sem_unlink.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/semaphore/sem_unlink.c b/fs/semaphore/sem_unlink.c
index 1b7ad68a7d..f363c2a534 100644
--- a/fs/semaphore/sem_unlink.c
+++ b/fs/semaphore/sem_unlink.c
@@ -97,7 +97,7 @@ int sem_unlink(FAR const char *name)
 
   if (!INODE_IS_NAMEDSEM(inode))
     {
-      errcode = ENXIO;
+      errcode = ENOENT;
       goto errout_with_inode;
     }