- msgsize = mq_get_msgsize(ctx.daemon_to_unmount_mq);
-
- if (msgsize < 2) {
- ERROR("Message queue max size must be at least 2!");
- ret = WIMLIB_ERR_MQUEUE;
- goto out_close_message_queues;
- }
-
- mailbox = MALLOC(msgsize);
- if (!mailbox) {
- ERROR("Failed to allocate %ld bytes for mailbox", msgsize);
- ret = WIMLIB_ERR_NOMEM;
+ ret = get_mailbox(ctx.daemon_to_unmount_mq, 2, &msgsize, &mailbox);
+ if (ret != 0)