]> granicus.if.org Git - strace/blob - linux/metag/get_error.c
strace.spec.in: compress changelog files
[strace] / linux / metag / get_error.c
1 #include "negated_errno.h"
2
3 static void
4 get_error(struct tcb *tcp, const bool check_errno)
5 {
6         /* result pointer in D0Re0 (D0.0) */
7         if (check_errno && is_negated_errno(metag_regs.dx[0][0])) {
8                 tcp->u_rval = -1;
9                 tcp->u_error = -metag_regs.dx[0][0];
10         } else {
11                 tcp->u_rval = metag_regs.dx[0][0];
12         }
13 }