Skip to content

Commit 10e407d

Browse files
committed
clone.c: make use of RVAL_DECODED
* clone.c (sys_setns, sys_unshare, sys_fork): Update for RVAL_DECODED.
1 parent cbabaf9 commit 10e407d

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

clone.c

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -102,24 +102,20 @@ SYS_FUNC(clone)
102102

103103
SYS_FUNC(setns)
104104
{
105-
if (entering(tcp)) {
106-
printfd(tcp, tcp->u_arg[0]);
107-
tprints(", ");
108-
printflags(clone_flags, tcp->u_arg[1], "CLONE_???");
109-
}
110-
return 0;
105+
printfd(tcp, tcp->u_arg[0]);
106+
tprints(", ");
107+
printflags(clone_flags, tcp->u_arg[1], "CLONE_???");
108+
109+
return RVAL_DECODED;
111110
}
112111

113112
SYS_FUNC(unshare)
114113
{
115-
if (entering(tcp))
116-
printflags(clone_flags, tcp->u_arg[0], "CLONE_???");
117-
return 0;
114+
printflags(clone_flags, tcp->u_arg[0], "CLONE_???");
115+
return RVAL_DECODED;
118116
}
119117

120118
SYS_FUNC(fork)
121119
{
122-
if (exiting(tcp))
123-
return RVAL_UDECIMAL;
124-
return 0;
120+
return RVAL_DECODED | RVAL_UDECIMAL;
125121
}

0 commit comments

Comments
 (0)