summaryrefslogtreecommitdiff
path: root/stream.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>2005-06-01 19:02:36 +0000
committerRoland McGrath <roland@redhat.com>2005-06-01 19:02:36 +0000
commitb2dee13345a62c80a677f3342cd525d611fbc632 (patch)
tree6fa505cc1d095f9d4907c0e6eda7af06d752292d /stream.c
parenta6ef1a307592a4b03080782216c906763e1632d3 (diff)
downloadstrace-b2dee13345a62c80a677f3342cd525d611fbc632.tar.gz
strace-b2dee13345a62c80a677f3342cd525d611fbc632.tar.bz2
strace-b2dee13345a62c80a677f3342cd525d611fbc632.tar.xz
2005-05-31 Dmitry V. Levin <ldv@altlinux.org>
* util.c (printxval): Change third argument from "char *" to "const char *". (printflags): Add third argument, "const char *", with similar meaning to the third argument of printxval(). * defs.h (printxval): Change third argument from "char *" to "const char *". (printflags): Add third argument. * bjm.c (sys_query_module) [LINUX]: Pass third argument to printflags(). * desc.c (sys_fcntl): Likewise. (sys_flock) [LOCK_SH]: Likewise. (print_epoll_event) [HAVE_SYS_EPOLL_H]: Likewise. * file.c (sys_open): Likewise. (solaris_open) [LINUXSPARC]: Likewise. (sys_access): Likewise. (sys_chflags, sys_fchflags) [FREEBSD]: Likewise. (realprintstat) [HAVE_LONG_LONG_OFF_T && HAVE_STRUCT_STAT_ST_FLAGS]: Likewise. (printstat64) [HAVE_STAT64 && HAVE_STRUCT_STAT_ST_FLAGS]: Likewise. (sys_setxattr, sys_fsetxattr): Likewise. * ipc.c (sys_msgget, sys_msgsnd, sys_msgrcv, sys_semget, sys_shmget, sys_shmat) [LINUX || SUNOS4 || FREEBSD]: Likewise. (sys_mq_open) [LINUX]: Likewise. (printmqattr) [HAVE_MQUEUE_H]: Likewise. * mem.c (print_mmap) [!HAVE_LONG_LONG_OFF_T]: Likewise. (sys_mmap64) [_LFS64_LARGEFILE || HAVE_LONG_LONG_OFF_T]: Likewise. (sys_mprotect): Likewise. (sys_mremap, sys_madvise, sys_mlockall) [LINUX]: Likewise. (sys_msync) [MS_ASYNC]: Likewise. (sys_mctl) [MC_SYNC]: Likewise. (sys_remap_file_pages, sys_mbind, sys_get_mempolicy) [LINUX]: Likewise. * net.c (printmsghdr) [HAVE_STRUCT_MSGHDR_MSG_CONTROL]: Likewise. (sys_send, sys_sendto): Likewise. (sys_sendmsg) [HAVE_SENDMSG]: Likewise. (sys_recv, sys_recvfrom): Likewise. (sys_recvmsg) [HAVE_SENDMSG]: Likewise. (printicmpfilter) [ICMP_FILTER]: Likewise. * proc.c (proc_ioctl) [SVR4 && !HAVE_MP_PROCFS || FREEBSD]: Likewise. * process.c (sys_clone) [LINUX]: Likewise. (printwaitn): Likewise. (sys_waitid) [SVR4 || LINUX]: Likewise. * signal.c (sys_sigvec) [SUNOS4 || FREEBSD]: Likewise. (sys_sigaction): Likewise. (printcontext) [SVR4]: Likewise. (print_stack_t) [LINUX) || FREEBSD]: Likewise. (sys_rt_sigaction) [LINUX]: Likewise. * sock.c (sock_ioctl) [LINUX]: Likewise. * stream.c (sys_putmsg, sys_getmsg): Likewise. (sys_putpmsg) [SYS_putpmsg]: Likewise. (sys_getpmsg) [SYS_getpmsg]: Likewise. (sys_poll): Likewise. (print_transport_message) [TI_BIND]: Likewise. (stream_ioctl): Likewise. * system.c (sys_mount, sys_reboot): Likewise. (sys_cacheflush) [LINUX && M68K]: Likewise. (sys_capget, sys_capset) [SYS_capget]: Likewise. * term.c (term_ioctl) [TIOCMGET]: Likewise. * time.c (sys_clock_nanosleep, sys_timer_settime) [LINUX]: Likewise. Fixes RH#159310.
Diffstat (limited to 'stream.c')
-rw-r--r--stream.c52
1 files changed, 22 insertions, 30 deletions
diff --git a/stream.c b/stream.c
index 68be3a4..998fd8a 100644
--- a/stream.c
+++ b/stream.c
@@ -124,8 +124,7 @@ struct tcb *tcp;
for (i = 1; i < 3; i++)
printstrbufarg(tcp, tcp->u_arg[i], 0);
/* flags */
- if (!printflags(msgflags, tcp->u_arg[3]))
- tprintf("0");
+ printflags(msgflags, tcp->u_arg[3], "RS_???");
}
return 0;
}
@@ -155,8 +154,7 @@ struct tcb *tcp;
tprintf("[?]");
else {
tprintf("[");
- if (!printflags(msgflags, flags))
- tprintf("0");
+ printflags(msgflags, flags, "RS_???");
tprintf("]");
}
/* decode return value */
@@ -209,8 +207,7 @@ struct tcb *tcp;
/* band */
tprintf("%ld, ", tcp->u_arg[3]);
/* flags */
- if (!printflags(pmsgflags, tcp->u_arg[4]))
- tprintf("0");
+ printflags(pmsgflags, tcp->u_arg[4], "MSG_???");
}
return 0;
}
@@ -245,8 +242,7 @@ struct tcb *tcp;
tprintf("[?]");
else {
tprintf("[");
- if (!printflags(pmsgflags, flags))
- tprintf("0");
+ printflags(pmsgflags, flags, "MSG_???");
tprintf("]");
}
/* decode return value */
@@ -334,13 +330,12 @@ struct tcb *tcp;
continue;
}
tprintf("{fd=%d, events=", pollp[i].fd);
- if (!printflags(pollflags, pollp[i].events))
- tprintf("0");
+ printflags(pollflags, pollp[i].events,
+ "POLL???");
if (!syserror(tcp) && pollp[i].revents) {
tprintf(", revents=");
- if (!printflags(pollflags,
- pollp[i].revents))
- tprintf("0");
+ printflags(pollflags, pollp[i].revents,
+ "POLL???");
}
tprintf("}");
}
@@ -774,7 +769,8 @@ int len;
GET (T_OPTMGMT_REQ, optmgmt_req);
COMMA ();
tprintf ("MGMT=");
- printflags (transport_user_flags, m.optmgmt_req.MGMT_flags);
+ printflags (transport_user_flags, m.optmgmt_req.MGMT_flags,
+ "T_???");
STRUCT (optmgmt_req, OPT, print_optmgmt);
break;
#endif
@@ -834,7 +830,7 @@ int len;
tprintf (", CURRENT=");
printxval (ts_state, m.info_ack.CURRENT_state, "TS_???");
tprintf (", PROVIDER=");
- printflags (provider_flags, m.info_ack.PROVIDER_flag);
+ printflags (provider_flags, m.info_ack.PROVIDER_flag, "???");
break;
#endif
#ifdef T_BIND_ACK
@@ -885,7 +881,8 @@ int len;
GET (T_OPTMGMT_ACK, optmgmt_ack);
COMMA ();
tprintf ("MGMT=");
- printflags (transport_user_flags, m.optmgmt_ack.MGMT_flags);
+ printflags (transport_user_flags, m.optmgmt_ack.MGMT_flags,
+ "T_???");
STRUCT (optmgmt_ack, OPT, print_optmgmt);
break;
#endif
@@ -1127,8 +1124,7 @@ int code, arg;
tprintf(", {...}");
else {
tprintf(", {bi_pri=%d, bi_flag=", bi.bi_pri);
- if (!printflags(stream_flush_options, bi.bi_flag))
- tprintf("0");
+ printflags(stream_flush_options, bi.bi_flag, "FLUSH???");
tprintf("}");
}
return 1;
@@ -1136,8 +1132,7 @@ int code, arg;
case I_SETSIG:
/* argument is a set of flags */
tprintf(", ");
- if (!printflags(stream_setsig_flags, arg))
- tprintf("0");
+ printflags(stream_setsig_flags, arg, "S_???");
return 1;
case I_GETSIG:
/* argument is a pointer to a set of flags */
@@ -1146,8 +1141,8 @@ int code, arg;
tprintf(", [");
if (umove(tcp, arg, &val) < 0)
tprintf("?");
- else if (!printflags(stream_setsig_flags, val))
- tprintf("0");
+ else
+ printflags(stream_setsig_flags, val, "S_???");
tprintf("]");
return 1;
case I_PEEK:
@@ -1163,8 +1158,7 @@ int code, arg;
tprintf(", databuf=");
printstrbuf(tcp, &sp.databuf, 1);
tprintf(", flags=");
- if (!printflags(msgflags, sp.flags))
- tprintf("0");
+ printflags(msgflags, sp.flags, "RS_???");
tprintf("}");
return 1;
case I_SRDOPT:
@@ -1216,16 +1210,14 @@ int code, arg;
tprintf(", databuf=");
printstrbuf(tcp, &sfi.databuf, 1);
tprintf(", flags=");
- if (!printflags(msgflags, sfi.flags))
- tprintf("0");
+ printflags(msgflags, sfi.flags, "RS_???");
tprintf(", filedes=%d, offset=%d}", sfi.fildes, sfi.offset);
return 1;
#ifdef I_SWROPT
case I_SWROPT:
/* argument is a set of flags */
tprintf(", ");
- if (!printflags(stream_write_flags, arg))
- tprintf("0");
+ printflags(stream_write_flags, arg, "SND???");
return 1;
#endif /* I_SWROPT */
#ifdef I_GWROPT
@@ -1236,8 +1228,8 @@ int code, arg;
tprintf(", [");
if (umove(tcp, arg, &val) < 0)
tprintf("?");
- else if (!printflags(stream_write_flags, arg))
- tprintf("0");
+ else
+ printflags(stream_write_flags, arg, "SND???");
tprintf("]");
return 1;
#endif /* I_GWROPT */