Commit 53f8c314 authored by Kir Kolyshkin's avatar Kir Kolyshkin Committed by Pavel Emelyanov

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: 's avatarKir Kolyshkin <kir@openvz.org>
Reviewed-by: 's avatarLaurent Dufour <ldufour@linux.vnet.ibm.com>
Acked-by: 's avatarAndrew Vagin <avagin@odin.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 0f6b5d92
......@@ -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;
}
......
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