[CRIU] [PATCH] criu/restorer: print valid string when set last_pid fails
Andrei Vagin
avagin at virtuozzo.com
Tue May 8 00:32:38 MSK 2018
Applied, thanks!
On Mon, May 07, 2018 at 02:09:06PM +0300, joeln at il.ibm.com wrote:
> From: Joel Nider <joeln at il.ibm.com>
>
> 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 at il.ibm.com>
> ---
> criu/pie/restorer.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/criu/pie/restorer.c b/criu/pie/restorer.c
> index ab0c0d7..69f8504 100644
> --- a/criu/pie/restorer.c
> +++ b/criu/pie/restorer.c
> @@ -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;
> --
> 2.7.4
>
More information about the CRIU
mailing list