Commit 63137fbe authored by Pavel Emelyanov's avatar Pavel Emelyanov Committed by Cyrill Gorcunov

restorer: Drop unneded last_pid_buf

Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
parent 3302183c
...@@ -65,9 +65,6 @@ struct task_restore_core_args { ...@@ -65,9 +65,6 @@ struct task_restore_core_args {
int pid; /* task pid */ int pid; /* task pid */
int fd_core; /* opened core file */ int fd_core; /* opened core file */
int fd_self_vmas; /* opened file with running VMAs to unmap */ int fd_self_vmas; /* opened file with running VMAs to unmap */
union {
char last_pid_buf[PATH_MAX]; /* internal buffer to save stack space */
};
char ns_last_pid_path[PATH_MAX]; char ns_last_pid_path[PATH_MAX];
bool restore_threads; /* if to restore threads */ bool restore_threads; /* if to restore threads */
u32 rst_lock; u32 rst_lock;
......
...@@ -468,6 +468,7 @@ self_len_end: ...@@ -468,6 +468,7 @@ self_len_end:
} }
for (i = 0; i < args->nr_threads; i++) { for (i = 0; i < args->nr_threads; i++) {
char last_pid_buf[16];
/* skip self */ /* skip self */
if (thread_args[i].pid == args->pid) if (thread_args[i].pid == args->pid)
...@@ -479,12 +480,12 @@ self_len_end: ...@@ -479,12 +480,12 @@ self_len_end:
RESTORE_ALIGN_STACK((long)thread_args[i].mem_zone.stack, RESTORE_ALIGN_STACK((long)thread_args[i].mem_zone.stack,
sizeof(thread_args[i].mem_zone.stack)); sizeof(thread_args[i].mem_zone.stack));
last_pid_len = vprint_num(args->last_pid_buf, thread_args[i].pid - 1); last_pid_len = vprint_num(last_pid_buf, thread_args[i].pid - 1);
ret = sys_write(fd, args->last_pid_buf, last_pid_len - 1); ret = sys_write(fd, last_pid_buf, last_pid_len - 1);
if (ret < 0) { if (ret < 0) {
write_num_n(__LINE__); write_num_n(__LINE__);
write_num_n(ret); write_num_n(ret);
write_string_n(args->last_pid_buf); write_string_n(last_pid_buf);
goto core_restore_end; goto core_restore_end;
} }
......
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