alpha, ia64, mips, sh*, sparc*: fix error path decoding of pipe syscall
* net.c (do_pipe) [HAVE_GETRVAL2]: Remove. Always call decode_pair_fd on exiting. (SYS_FUNC(pipe)) [HAVE_GETRVAL2]: Call printpair_fd instead of do_pipe.
This commit is contained in:
parent
f9f04f74fc
commit
9b38885803
17
net.c
17
net.c
@ -1098,16 +1098,7 @@ static int
|
||||
do_pipe(struct tcb *tcp, int flags_arg)
|
||||
{
|
||||
if (exiting(tcp)) {
|
||||
if (syserror(tcp)) {
|
||||
printaddr(tcp->u_arg[0]);
|
||||
} else {
|
||||
#ifdef HAVE_GETRVAL2
|
||||
if (flags_arg < 0) {
|
||||
printpair_fd(tcp, tcp->u_rval, getrval2(tcp));
|
||||
} else
|
||||
#endif
|
||||
decode_pair_fd(tcp, tcp->u_arg[0]);
|
||||
}
|
||||
decode_pair_fd(tcp, tcp->u_arg[0]);
|
||||
if (flags_arg >= 0) {
|
||||
tprints(", ");
|
||||
printflags(open_mode_flags, tcp->u_arg[flags_arg], "O_???");
|
||||
@ -1118,7 +1109,13 @@ do_pipe(struct tcb *tcp, int flags_arg)
|
||||
|
||||
SYS_FUNC(pipe)
|
||||
{
|
||||
#ifdef HAVE_GETRVAL2
|
||||
if (exiting(tcp) && !syserror(tcp))
|
||||
printpair_fd(tcp, tcp->u_rval, getrval2(tcp));
|
||||
return 0;
|
||||
#else
|
||||
return do_pipe(tcp, -1);
|
||||
#endif
|
||||
}
|
||||
|
||||
SYS_FUNC(pipe2)
|
||||
|
Loading…
Reference in New Issue
Block a user