From 572f152ea0c9bb83c87cf241708e3258b2d37f2e Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Wed, 7 Oct 2015 09:19:47 -0700 Subject: [PATCH] aarch64:get_task_regs(): use pr_perror() As ptrace() sets errno, it makes sense to use pr_perror(). This also fixes the bug of missing '\n'. Signed-off-by: Kir Kolyshkin Acked-by: Andrew Vagin Signed-off-by: Pavel Emelyanov --- arch/aarch64/crtools.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/aarch64/crtools.c b/arch/aarch64/crtools.c index 90af289e7..9dc2777ef 100644 --- a/arch/aarch64/crtools.c +++ b/arch/aarch64/crtools.c @@ -92,14 +92,14 @@ int get_task_regs(pid_t pid, user_regs_struct_t regs, CoreEntry *core) iov.iov_base = ®s; iov.iov_len = sizeof(user_regs_struct_t); if ((ret = ptrace(PTRACE_GETREGSET, pid, NT_PRSTATUS, &iov))) { - pr_err("Failed to obtain CPU registers for %d!", pid); + pr_perror("Failed to obtain CPU registers for %d", pid); goto err; } iov.iov_base = &fpsimd; iov.iov_len = sizeof(fpsimd); if ((ret = ptrace(PTRACE_GETREGSET, pid, NT_PRFPREG, &iov))) { - pr_err("Failed to obtain FPU registers for %d!", pid); + pr_perror("Failed to obtain FPU registers for %d", pid); goto err; }