diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-12-06 07:18:48 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-12-06 07:18:48 -0600 |
commit | 8a9a1e6cb28f4813fec9955b76bb6aa08d777d33 (patch) | |
tree | 7b5c7f12f2be9e8d83fd2b958eb33ca451545aa5 /nuttx/fs/mqueue | |
parent | c0be986a323c2103e51428200c7492d505dbfe6d (diff) | |
download | px4-nuttx-8a9a1e6cb28f4813fec9955b76bb6aa08d777d33.tar.gz px4-nuttx-8a9a1e6cb28f4813fec9955b76bb6aa08d777d33.tar.bz2 px4-nuttx-8a9a1e6cb28f4813fec9955b76bb6aa08d777d33.zip |
In message queue created return ENOSPC error if size exceeds the configured size of pre-allocatd messages; Use ENOSPC vs ENOMEM per OpenGroup.org. From Pierre-Noel Bouteville
Diffstat (limited to 'nuttx/fs/mqueue')
-rw-r--r-- | nuttx/fs/mqueue/mq_open.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/nuttx/fs/mqueue/mq_open.c b/nuttx/fs/mqueue/mq_open.c index 076971287..f2b95b9b5 100644 --- a/nuttx/fs/mqueue/mq_open.c +++ b/nuttx/fs/mqueue/mq_open.c @@ -52,17 +52,8 @@ #include "inode/inode.h" #include "mqueue/mqueue.h" -#if 0 -#include <sys/types.h> -#include <stdint.h> -#include <debug.h> - - -#include "sched/sched.h" -#endif - /**************************************************************************** - * Pre-procesor Definitions + * Pre-processor Definitions ****************************************************************************/ /**************************************************************************** @@ -220,7 +211,7 @@ mqd_t mq_open(FAR const char *mq_name, int oflags, ...) msgq = (FAR struct mqueue_inode_s*)mq_msgqalloc(mode, attr); if (!msgq) { - errcode = ENOMEM; + errcode = ENOSPC; goto errout_with_inode; } |