Commit 79a88ae0 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

rlimit: Stop writting old rlimits image entries

We're using new image format, but old image file
is still generated. This will be addressed in
next patch.
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent b478b2fb
......@@ -317,7 +317,7 @@ static inline u_int64_t encode_rlim(unsigned long val)
return val == RLIM_INFINITY ? -1 : val;
}
static int __dump_task_rlimits(int pid, TaskRlimitsEntry *rls)
static int dump_task_rlimits(int pid, TaskRlimitsEntry *rls)
{
int res;
......@@ -342,31 +342,6 @@ static int __dump_task_rlimits(int pid, TaskRlimitsEntry *rls)
return 0;
}
static int dump_task_rlims(int pid, struct cr_fdset *fds)
{
int res, fd;
fd = fdset_fd(fds, CR_FD_RLIMIT);
for (res = 0; res < RLIM_NLIMITS; res++) {
struct rlimit lim;
RlimitEntry re = RLIMIT_ENTRY__INIT;
if (prlimit(pid, res, NULL, &lim)) {
pr_perror("Can't get rlimit %d", res);
return -1;
}
re.cur = encode_rlim(lim.rlim_cur);
re.max = encode_rlim(lim.rlim_max);
if (pb_write_one(fd, &re, PB_RLIMIT))
return -1;
}
return 0;
}
static int dump_filemap(pid_t pid, struct vma_area *vma_area,
const struct cr_fdset *fdset)
{
......@@ -706,7 +681,7 @@ static int dump_task_core_all(struct pstree_item *item,
if (ret)
goto err;
ret = __dump_task_rlimits(pid, core->rlimits);
ret = dump_task_rlimits(pid, core->rlimits);
if (ret)
goto err;
......@@ -1604,12 +1579,6 @@ static int dump_one_task(struct pstree_item *item)
goto err;
}
ret = dump_task_rlims(pid, cr_fdset);
if (ret) {
pr_err("Dump %d rlimits failed %d\n", pid, ret);
goto err;
}
ret = dump_task_signals(pid, item, cr_fdset);
if (ret) {
pr_err("Dump %d signals failed %d\n", pid, ret);
......
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