Commit 1d438db6 authored by Pavel Emelyanov's avatar Pavel Emelyanov

rlimits: Move entries from top-core into task-core

This appeared after latest 1.2, so it's still possible
to do this move.
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 35e560de
......@@ -671,7 +671,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->tc->rlimits);
if (ret)
goto err;
......
......@@ -2110,8 +2110,8 @@ static int prepare_rlimits(int pid, CoreEntry *core)
/*
* New image format: rlimits are bound to the core entry.
*/
if (core->rlimits) {
TaskRlimitsEntry *rls = core->rlimits;
if (core->tc->rlimits) {
TaskRlimitsEntry *rls = core->tc->rlimits;
int i;
for (i = 0; i < rls->n_rlimits; i++) {
......
......@@ -16,6 +16,7 @@ message task_core_entry {
required string comm = 6;
optional task_timers_entry timers = 7;
optional task_rlimits_entry rlimits = 8;
}
message task_kobj_ids_entry {
......@@ -67,6 +68,4 @@ message core_entry {
optional task_core_entry tc = 3;
optional task_kobj_ids_entry ids = 4;
optional thread_core_entry thread_core = 5;
optional task_rlimits_entry rlimits = 7;
}
......@@ -65,9 +65,8 @@ CoreEntry *core_entry_alloc(int th, int tsk)
TaskTimersEntry *tte;
int i;
rls = xptr_pull(&m, TaskRlimitsEntry);
rls = core->tc->rlimits = xptr_pull(&m, TaskRlimitsEntry);
task_rlimits_entry__init(rls);
core->rlimits = rls;
rls->n_rlimits = RLIM_NLIMITS;
rls->rlimits = xptr_pull_s(&m, sizeof(RlimitEntry *) * RLIM_NLIMITS);
......
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