summaryrefslogtreecommitdiff
path: root/nuttx/fs
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-12-06 07:18:48 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-12-06 07:18:48 -0600
commit8a9a1e6cb28f4813fec9955b76bb6aa08d777d33 (patch)
tree7b5c7f12f2be9e8d83fd2b958eb33ca451545aa5 /nuttx/fs
parentc0be986a323c2103e51428200c7492d505dbfe6d (diff)
downloadpx4-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')
-rw-r--r--nuttx/fs/mqueue/mq_open.c13
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;
}