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

This commit is contained in:
Gregory Nutt
2014-12-06 07:18:48 -06:00
parent d007a49194
commit ff87e2e02a
3 changed files with 22 additions and 25 deletions
+2 -11
View File
@@ -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;
}