mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-28 21:07:43 +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:
parent
8aba610bd3
commit
21b754921e
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user