sys_fcntl(struct tcb *tcp)
{
if (entering(tcp)) {
- tprintf("%ld, ", tcp->u_arg[0]);
+ printfd(tcp, tcp->u_arg[0]);
+ tprintf(", ");
printxval(fcntlcmds, tcp->u_arg[1], "F_???");
switch (tcp->u_arg[1]) {
case F_SETFD:
sys_flock(struct tcb *tcp)
{
if (entering(tcp)) {
- tprintf("%ld, ", tcp->u_arg[0]);
+ printfd(tcp, tcp->u_arg[0]);
+ tprintf(", ");
printflags(flockcmds, tcp->u_arg[1], "LOCK_???");
}
return 0;
sys_close(struct tcb *tcp)
{
if (entering(tcp)) {
- tprintf("%ld", tcp->u_arg[0]);
+ printfd(tcp, tcp->u_arg[0]);
}
return 0;
}
sys_dup(struct tcb *tcp)
{
if (entering(tcp)) {
- tprintf("%ld", tcp->u_arg[0]);
+ printfd(tcp, tcp->u_arg[0]);
}
return 0;
}
do_dup2(struct tcb *tcp, int flags_arg)
{
if (entering(tcp)) {
- tprintf("%ld, %ld", tcp->u_arg[0], tcp->u_arg[1]);
+ printfd(tcp, tcp->u_arg[0]);
+ tprintf(", ");
+ printfd(tcp, tcp->u_arg[1]);
if (flags_arg >= 0) {
tprintf(", ");
printflags(open_mode_flags, tcp->u_arg[flags_arg], "O_???");
& -sizeof(long));
fd_set *fds;
static char outstr[1024];
- char *sep;
+ const char *sep;
long arg;
if (entering(tcp)) {
tprintf(", [");
for (j = 0, sep = ""; j < nfds; j++) {
if (FD_ISSET(j, fds)) {
- tprintf("%s%u", sep, j);
+ tprintf("%s", sep);
+ printfd(tcp, j);
sep = " ";
}
}
else
{
unsigned int cumlen = 0;
- char *sep = "";
+ const char *sep = "";
if (syserror(tcp))
return 0;
sys_epoll_ctl(struct tcb *tcp)
{
if (entering(tcp)) {
- tprintf("%ld, ", tcp->u_arg[0]);
+ printfd(tcp, tcp->u_arg[0]);
+ tprintf(", ");
printxval(epollctls, tcp->u_arg[1], "EPOLL_CTL_???");
- tprintf(", %ld, ", tcp->u_arg[2]);
+ tprintf(", ");
+ printfd(tcp, tcp->u_arg[2]);
+ tprintf(", ");
if (tcp->u_arg[3] == 0)
tprintf("NULL");
else {
static void
epoll_wait_common(struct tcb *tcp)
{
- if (entering(tcp))
- tprintf("%ld, ", tcp->u_arg[0]);
- else {
+ if (entering(tcp)) {
+ printfd(tcp, tcp->u_arg[0]);
+ tprintf(", ");
+ } else {
if (syserror(tcp))
tprintf("%lx", tcp->u_arg[1]);
else if (tcp->u_rval == 0)
sys_epoll_pwait(struct tcb *tcp)
{
epoll_wait_common(tcp);
- if (exiting(tcp))
+ if (exiting(tcp)) {
+ tprintf(", ");
print_sigset(tcp, tcp->u_arg[4], 0);
+ }
return 0;
}