[CRIU] [PATCH 1/7] aarch64:get_task_regs(): use pr_perror()

Kir Kolyshkin kir at openvz.org
Wed Oct 7 09:19:47 PDT 2015


As ptrace() sets errno, it makes sense to use pr_perror().
This also fixes the bug of missing '\n'.

Signed-off-by: Kir Kolyshkin <kir at openvz.org>
---
 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 90af289..9dc2777 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 = &regs;
 	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;
 	}
 
-- 
2.4.3



More information about the CRIU mailing list