(root)/
strace-6.5/
src/
linux/
sh64/
get_error.c
       1  /*
       2   * Copyright (c) 2015-2021 The strace developers.
       3   * All rights reserved.
       4   *
       5   * SPDX-License-Identifier: LGPL-2.1-or-later
       6   */
       7  
       8  #include "negated_errno.h"
       9  
      10  static void
      11  arch_get_error(struct tcb *tcp, const bool check_errno)
      12  {
      13  	if (check_errno && is_negated_errno(sh64_regs.regs[9])) {
      14  		tcp->u_rval = -1;
      15  		tcp->u_error = -sh64_regs.regs[9];
      16  	} else {
      17  		tcp->u_rval = sh64_regs.regs[9];
      18  	}
      19  }