2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-30 22:05:36 +00:00

ppc64/crtools.c: use pr_perror()

In places where we have errno value set, such as after calling ptrace(),
it makes sense to use pr_perror as it appends the errno string. This
also fixes missing '\n' at the end (as pr_perror() adds it).

In places where we keep using pr_err(), don't forget to have '\n'.

Cc: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Reviewed-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Acked-by: Andrew Vagin <avagin@odin.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Kir Kolyshkin
2015-10-07 09:19:51 -07:00
committed by Pavel Emelyanov
parent 0f6b5d921c
commit 53f8c31459

View File

@@ -126,7 +126,7 @@ static int get_fpu_regs(pid_t pid, CoreEntry *core)
int i;
if (ptrace(PTRACE_GETFPREGS, pid, 0, (void *)&fpregs) < 0) {
pr_err("Couldn't get floating-point registers.");
pr_perror("Couldn't get floating-point registers");
return -1;
}
@@ -180,7 +180,7 @@ static int get_altivec_regs(pid_t pid, CoreEntry *core)
/* PTRACE_GETVRREGS returns EIO if Altivec is not supported.
* This should not happen if msr_vec is set. */
if (errno != EIO) {
pr_err("Couldn't get Altivec registers");
pr_perror("Couldn't get Altivec registers");
return -1;
}
pr_debug("Altivec not supported\n");
@@ -229,7 +229,7 @@ static int put_altivec_regs(mcontext_t *mc, UserPpc64VrstateEntry *vse)
pr_debug("Restoring Altivec registers\n");
if (vse->n_vrregs != 33*2) {
pr_err("Corrupted Altivec dump data");
pr_err("Corrupted Altivec dump data\n");
return -1;
}
@@ -272,7 +272,7 @@ static int get_vsx_regs(pid_t pid, CoreEntry *core)
pr_debug("VSX register's dump not supported.\n");
return 0;
}
pr_err("Couldn't get VSX registers");
pr_perror("Couldn't get VSX registers");
return -1;
}