2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-28 12:57:57 +00:00

criu/restorer: print valid string when set last_pid fails

The string returned by std_vprint_num() is right-aligned in the buffer.
Therefore, we must print the string starting from the pointer returned in
the 'ps' argument, and not from the start of the original buffer.

Signed-off-by: Joel Nider <joeln@il.ibm.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
Joel Nider 2018-05-07 14:09:06 +03:00 committed by Andrei Vagin
parent 8aba610bd3
commit 21b754921e

View File

@ -1577,7 +1577,7 @@ long __export_restore_task(struct task_restore_args *args)
sys_lseek(fd, 0, SEEK_SET);
ret = sys_write(fd, s, last_pid_len);
if (ret < 0) {
pr_err("Can't set last_pid %ld/%s\n", ret, last_pid_buf);
pr_err("Can't set last_pid %ld/%s\n", ret, s);
mutex_unlock(&task_entries_local->last_pid_mutex);
sys_close(fd);
goto core_restore_end;