syscall_get_error() is required to be implemented on all architectures in addition to already implemented syscall_get_nr(), syscall_get_arguments(), syscall_get_return_value(), and syscall_get_arch() functions in order to extend the generic ptrace API with PTRACE_GET_SYSCALL_INFO request.
Acked-by: Helge Deller <del...@gmx.de> # parisc Cc: James E.J. Bottomley <j...@parisc-linux.org> Cc: Elvira Khabirova <lineprin...@altlinux.org> Cc: Eugene Syromyatnikov <e...@redhat.com> Cc: Oleg Nesterov <o...@redhat.com> Cc: Andy Lutomirski <l...@kernel.org> Cc: linux-par...@vger.kernel.org Signed-off-by: Dmitry V. Levin <l...@altlinux.org> --- Notes: v10: unchanged v9: unchanged v8: added Acked-by v7: unchanged v6: unchanged v5: initial revision arch/parisc/include/asm/syscall.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/parisc/include/asm/syscall.h b/arch/parisc/include/asm/syscall.h index 80757e43cf2c..00b127a5e09b 100644 --- a/arch/parisc/include/asm/syscall.h +++ b/arch/parisc/include/asm/syscall.h @@ -29,6 +29,13 @@ static inline void syscall_get_arguments(struct task_struct *tsk, args[0] = regs->gr[26]; } +static inline long syscall_get_error(struct task_struct *task, + struct pt_regs *regs) +{ + unsigned long error = regs->gr[28]; + return IS_ERR_VALUE(error) ? error : 0; +} + static inline long syscall_get_return_value(struct task_struct *task, struct pt_regs *regs) { -- ldv