Commit 21c1e71b authored by Pavel Emelyanov's avatar Pavel Emelyanov

ipc: The mqueue syscls can be missing from kernel

All this sits under config option, so we shouldn't try
to read/write them in this case. What to do if they are
in different on/off state on src/dst kernels is an open
question :\
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 61c6360c
......@@ -296,13 +296,28 @@ static int ipc_sysctl_req(IpcVarEntry *e, int op)
{ "kernel/shmall", &e->shm_ctlall, CTL_U64 },
{ "kernel/shmmni", &e->shm_ctlmni, CTL_U32 },
{ "kernel/shm_rmid_forced", &e->shm_rmid_forced, CTL_U32 },
{ },
};
struct sysctl_req req_mq[] = {
{ "fs/mqueue/queues_max", &e->mq_queues_max, CTL_U32 },
{ "fs/mqueue/msg_max", &e->mq_msg_max, CTL_U32 },
{ "fs/mqueue/msgsize_max", &e->mq_msgsize_max, CTL_U32 },
{ },
};
return sysctl_op(req, op);
int ret;
ret = sysctl_op(req, op);
if (ret)
return ret;
if (access("/proc/sys/mqueue", X_OK)) {
pr_info("Mqueue sysctls are missing\n");
return 0;
}
return sysctl_op(req_mq, op);
}
/*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment