Use tprints with literal strings, it may be faster than tprintf
* bjm.c: Replace tprintf("str") with tprints("str").
* block.c: Likewise.
* desc.c: Likewise.
* file.c: Likewise.
* io.c: Likewise.
* ipc.c: Likewise.
* mem.c: Likewise.
* net.c: Likewise.
* proc.c: Likewise.
* process.c: Likewise.
* quota.c: Likewise.
* resource.c: Likewise.
* scsi.c: Likewise.
* signal.c: Likewise.
* sock.c: Likewise.
* strace.c: Likewise.
* stream.c: Likewise.
* syscall.c: Likewise.
* system.c: Likewise.
* term.c: Likewise.
* time.c: Likewise.
* util.c: Likewise.
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
diff --git a/bjm.c b/bjm.c
index 1b4577a..5bcea8d 100644
--- a/bjm.c
+++ b/bjm.c
@@ -102,9 +102,9 @@
{
if (entering(tcp)) {
printstr(tcp, tcp->u_arg[0], -1);
- tprintf(", ");
+ tprints(", ");
printxval(which, tcp->u_arg[1], "QM_???");
- tprintf(", ");
+ tprints(", ");
} else {
size_t ret;
@@ -126,7 +126,7 @@
} else if ((tcp->u_arg[1]==QM_MODULES) ||
(tcp->u_arg[1]==QM_DEPS) ||
(tcp->u_arg[1]==QM_REFS)) {
- tprintf("{");
+ tprints("{");
if (!abbrev(tcp)) {
char* data = malloc(tcp->u_arg[3]);
char* mod = data;
@@ -153,7 +153,7 @@
tprintf(" /* %Zu entries */ ", ret);
tprintf("}, %Zu", ret);
} else if (tcp->u_arg[1]==QM_SYMBOLS) {
- tprintf("{");
+ tprints("{");
if (!abbrev(tcp)) {
char* data = malloc(tcp->u_arg[3]);
struct module_symbol* sym = (struct module_symbol*)data;
diff --git a/block.c b/block.c
index 14453a4..68c6c70 100644
--- a/block.c
+++ b/block.c
@@ -93,7 +93,7 @@
{
struct blkpg_partition p;
- tprintf("{");
+ tprints("{");
printxval(blkpg_ops, blkpg->op, "BLKPG_???");
tprintf(", flags=%d, datalen=%d, ",
@@ -239,7 +239,7 @@
if (umove(tcp, arg, &blkpg) < 0)
tprintf(", %#lx", arg);
else {
- tprintf(", ");
+ tprints(", ");
print_blkpg_req(tcp, &blkpg);
}
}
diff --git a/desc.c b/desc.c
index 5cb8a1a..4d46339 100644
--- a/desc.c
+++ b/desc.c
@@ -248,7 +248,7 @@
int32_t l_pid; /* pid_t */
} fl32;
if (umove(tcp, addr, &fl32) < 0) {
- tprintf("{...}");
+ tprints("{...}");
return;
}
fl.l_type = fl32.l_type;
@@ -266,19 +266,19 @@
#endif
{
if (umove(tcp, addr, &fl) < 0) {
- tprintf("{...}");
+ tprints("{...}");
return;
}
}
- tprintf("{type=");
+ tprints("{type=");
printxval(lockfcmds, fl.l_type, "F_???");
- tprintf(", whence=");
+ tprints(", whence=");
printxval(whence, fl.l_whence, "SEEK_???");
tprintf(", start=%ld, len=%ld", fl.l_start, fl.l_len);
if (getlk)
tprintf(", pid=%lu}", (unsigned long) fl.l_pid);
else
- tprintf("}");
+ tprints("}");
}
#endif
@@ -290,18 +290,18 @@
struct flock64 fl;
if (umove(tcp, addr, &fl) < 0) {
- tprintf("{...}");
+ tprints("{...}");
return;
}
- tprintf("{type=");
+ tprints("{type=");
printxval(lockfcmds, fl.l_type, "F_???");
- tprintf(", whence=");
+ tprints(", whence=");
printxval(whence, fl.l_whence, "SEEK_???");
tprintf(", start=%lld, len=%lld", (long long) fl.l_start, (long long) fl.l_len);
if (getlk)
tprintf(", pid=%lu}", (unsigned long) fl.l_pid);
else
- tprintf("}");
+ tprints("}");
}
#endif
@@ -310,11 +310,11 @@
{
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
printxval(fcntlcmds, tcp->u_arg[1], "F_???");
switch (tcp->u_arg[1]) {
case F_SETFD:
- tprintf(", ");
+ tprints(", ");
printflags(fdflags, tcp->u_arg[2], "FD_???");
break;
case F_SETOWN: case F_DUPFD:
@@ -324,14 +324,14 @@
tprintf(", %ld", tcp->u_arg[2]);
break;
case F_SETFL:
- tprintf(", ");
+ tprints(", ");
tprint_open_modes(tcp->u_arg[2]);
break;
case F_SETLK: case F_SETLKW:
#ifdef F_FREESP
case F_FREESP:
#endif
- tprintf(", ");
+ tprints(", ");
printflock(tcp, tcp->u_arg[2], 0);
break;
#if _LFS64_LARGEFILE
@@ -346,19 +346,19 @@
#if defined(F_SETLKW64) && F_SETLKW64 + 0 != F_SETLKW
case F_SETLKW64:
#endif
- tprintf(", ");
+ tprints(", ");
printflock64(tcp, tcp->u_arg[2], 0);
break;
#endif
#ifdef F_NOTIFY
case F_NOTIFY:
- tprintf(", ");
+ tprints(", ");
printflags(notifyflags, tcp->u_arg[2], "DN_???");
break;
#endif
#ifdef F_SETLEASE
case F_SETLEASE:
- tprintf(", ");
+ tprints(", ");
printxval(lockfcmds, tcp->u_arg[2], "F_???");
break;
#endif
@@ -391,14 +391,14 @@
tcp->auxstr = sprint_open_modes(tcp->u_rval);
return RVAL_HEX|RVAL_STR;
case F_GETLK:
- tprintf(", ");
+ tprints(", ");
printflock(tcp, tcp->u_arg[2], 1);
break;
#if _LFS64_LARGEFILE
#if defined(F_GETLK64) && F_GETLK64+0 != F_GETLK
case F_GETLK64:
#endif
- tprintf(", ");
+ tprints(", ");
printflock64(tcp, tcp->u_arg[2], 1);
break;
#endif
@@ -424,7 +424,7 @@
{
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
printflags(flockcmds, tcp->u_arg[1], "LOCK_???");
}
return 0;
@@ -454,10 +454,10 @@
{
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
printfd(tcp, tcp->u_arg[1]);
if (flags_arg >= 0) {
- tprintf(", ");
+ tprints(", ");
printflags(open_mode_flags, tcp->u_arg[flags_arg], "O_???");
}
}
@@ -505,7 +505,7 @@
for (i = 0; i < 3; i++) {
arg = args[i+1];
if (arg == 0) {
- tprintf(", NULL");
+ tprints(", NULL");
continue;
}
if (!verbose(tcp)) {
@@ -513,10 +513,10 @@
continue;
}
if (umoven(tcp, arg, fdsize, (char *) fds) < 0) {
- tprintf(", [?]");
+ tprints(", [?]");
continue;
}
- tprintf(", [");
+ tprints(", [");
for (j = 0, sep = ""; j < nfds; j++) {
if (FD_ISSET(j, fds)) {
tprints(sep);
@@ -524,10 +524,10 @@
sep = " ";
}
}
- tprintf("]");
+ tprints("]");
}
free(fds);
- tprintf(", ");
+ tprints(", ");
printtv_bitness(tcp, args[4], bitness, 0);
}
else {
@@ -608,7 +608,7 @@
long args[5];
if (umoven(tcp, tcp->u_arg[0], sizeof args, (char *) args) < 0) {
- tprintf("[...]");
+ tprints("[...]");
return 0;
}
return decode_select(tcp, args, BITNESS_CURRENT);
@@ -696,7 +696,7 @@
static void
print_epoll_event(struct epoll_event *ev)
{
- tprintf("{");
+ tprints("{");
printflags(epollevents, ev->events, "EPOLL???");
/* We cannot know what format the program uses, so print u32 and u64
which will cover every value. */
@@ -710,13 +710,13 @@
{
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
printxval(epollctls, tcp->u_arg[1], "EPOLL_CTL_???");
- tprintf(", ");
+ tprints(", ");
printfd(tcp, tcp->u_arg[2]);
- tprintf(", ");
+ tprints(", ");
if (tcp->u_arg[3] == 0)
- tprintf("NULL");
+ tprints("NULL");
else {
#ifdef HAVE_SYS_EPOLL_H
struct epoll_event ev;
@@ -724,7 +724,7 @@
print_epoll_event(&ev);
else
#endif
- tprintf("{...}");
+ tprints("{...}");
}
}
return 0;
@@ -735,36 +735,36 @@
{
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
} else {
if (syserror(tcp))
tprintf("%lx", tcp->u_arg[1]);
else if (tcp->u_rval == 0)
- tprintf("{}");
+ tprints("{}");
else {
#ifdef HAVE_SYS_EPOLL_H
struct epoll_event ev, *start, *cur, *end;
int failed = 0;
- tprintf("{");
+ tprints("{");
start = (struct epoll_event *) tcp->u_arg[1];
end = start + tcp->u_rval;
for (cur = start; cur < end; ++cur) {
if (cur > start)
- tprintf(", ");
+ tprints(", ");
if (umove(tcp, (long) cur, &ev) == 0)
print_epoll_event(&ev);
else {
- tprintf("?");
+ tprints("?");
failed = 1;
break;
}
}
- tprintf("}");
+ tprints("}");
if (failed)
tprintf(" %#lx", (long) start);
#else
- tprintf("{...}");
+ tprints("{...}");
#endif
}
tprintf(", %ld, %ld", tcp->u_arg[2], tcp->u_arg[3]);
@@ -783,7 +783,7 @@
{
epoll_wait_common(tcp);
if (exiting(tcp)) {
- tprintf(", ");
+ tprints(", ");
print_sigset(tcp, tcp->u_arg[4], 0);
}
return 0;
@@ -802,7 +802,7 @@
if (umove(tcp, tcp->u_arg[1], &user_id) == 0)
tprintf("{%lu}", user_id);
else
- tprintf("{...}");
+ tprints("{...}");
}
}
return 0;
@@ -875,7 +875,7 @@
nr = tcp->u_arg[1];
/* and if nr is negative? */
if (nr == 0)
- tprintf("{}");
+ tprints("{}");
else {
#ifdef HAVE_LIBAIO_H
long i;
@@ -885,16 +885,16 @@
enum iocb_sub sub;
struct iocb iocb;
if (i == 0)
- tprintf("{");
+ tprints("{");
else
- tprintf(", ");
+ tprints(", ");
if (umove(tcp, (unsigned long)iocbs, &iocbp) ||
umove(tcp, (unsigned long)iocbp, &iocb)) {
- tprintf("{...}");
+ tprints("{...}");
continue;
}
- tprintf("{");
+ tprints("{");
if (iocb.data)
tprintf("data:%p, ", iocb.data);
if (iocb.key)
@@ -906,7 +906,7 @@
switch (sub) {
case SUB_COMMON:
if (iocb.aio_lio_opcode == IO_CMD_PWRITE) {
- tprintf(", str:");
+ tprints(", str:");
printstr(tcp, (unsigned long)iocb.u.c.buf,
iocb.u.c.nbytes);
} else {
@@ -930,10 +930,10 @@
case SUB_NONE:
break;
}
- tprintf("}");
+ tprints("}");
}
if (i)
- tprintf("}");
+ tprints("}");
#else
#warning "libaio-devel is not available => no io_submit decoding"
tprintf("%#lx", tcp->u_arg[2]);
@@ -959,10 +959,10 @@
iocb.aio_reqprio, iocb.aio_fildes);
} else
#endif
- tprintf("{...}, ");
+ tprints("{...}, ");
} else {
if (tcp->u_rval < 0)
- tprintf("{...}");
+ tprints("{...}");
else {
#ifdef HAVE_LIBAIO_H
struct io_event event;
@@ -972,7 +972,7 @@
event.res, event.res2);
else
#endif
- tprintf("{...}");
+ tprints("{...}");
}
}
return 0;
@@ -986,7 +986,7 @@
tcp->u_arg[2]);
} else {
if (tcp->u_rval == 0) {
- tprintf("{}");
+ tprints("{}");
} else {
#ifdef HAVE_LIBAIO_H
struct io_event *events = (void *)tcp->u_arg[3];
@@ -996,20 +996,20 @@
struct io_event event;
if (i == 0)
- tprintf("{");
+ tprints("{");
else
- tprintf(", ");
+ tprints(", ");
if (umove(tcp, (unsigned long)events, &event) != 0) {
- tprintf("{...}");
+ tprints("{...}");
continue;
}
tprintf("{%p, %p, %ld, %ld}", event.data,
event.obj, event.res, event.res2);
}
- tprintf("}, ");
+ tprints("}, ");
#else
- tprintf("{...}");
+ tprints("{...}");
#endif
}
@@ -1038,7 +1038,7 @@
if (umove(tcp, tcp->u_arg[5], &data) < 0)
tprintf(", %#lx", tcp->u_arg[5]);
else {
- tprintf(", {");
+ tprints(", {");
if (data.len < sizeof(long))
tprintf("%#lx", (long)data.ss);
else
@@ -1055,7 +1055,7 @@
if (entering(tcp)) {
tprintf("%lu", tcp->u_arg[0]);
if (flags_arg >= 0) {
- tprintf(", ");
+ tprints(", ");
printflags(open_mode_flags, tcp->u_arg[flags_arg], "O_???");
}
}
diff --git a/file.c b/file.c
index 7bf1814..96e36a2 100644
--- a/file.c
+++ b/file.c
@@ -334,10 +334,10 @@
print_dirfd(struct tcb *tcp, int fd)
{
if (fd == AT_FDCWD)
- tprintf("AT_FDCWD, ");
+ tprints("AT_FDCWD, ");
else {
printfd(tcp, fd);
- tprintf(", ");
+ tprints(", ");
}
}
#endif
@@ -394,7 +394,7 @@
{
if (entering(tcp)) {
printpath(tcp, tcp->u_arg[offset]);
- tprintf(", ");
+ tprints(", ");
/* flags */
tprint_open_modes(tcp->u_arg[offset + 1]);
if (tcp->u_arg[offset + 1] & O_CREAT) {
@@ -445,7 +445,7 @@
{
if (entering(tcp)) {
printpath(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
/* flags */
printflags(openmodessol, tcp->u_arg[1] + 1, "O_???");
if (tcp->u_arg[1] & 0x100) {
@@ -487,7 +487,7 @@
{
if (entering(tcp)) {
printpath(tcp, tcp->u_arg[offset]);
- tprintf(", ");
+ tprints(", ");
printflags(access_flags, tcp->u_arg[offset + 1], "?_OK");
}
return 0;
@@ -535,7 +535,7 @@
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
offset = tcp->ext_arg[1];
_whence = tcp->u_arg[2];
if (_whence == SEEK_SET)
@@ -555,7 +555,7 @@
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
offset = tcp->u_arg[1];
_whence = tcp->u_arg[2];
if (_whence == SEEK_SET)
@@ -606,7 +606,7 @@
if (entering(tcp)) {
int argn;
printfd(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
argn = printllval(tcp, "%lld", 1);
tprintf(", %ld", tcp->u_arg[argn]);
}
@@ -621,7 +621,7 @@
if (entering(tcp)) {
int argn;
printfd(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
if (tcp->u_arg[3] == SEEK_SET)
argn = printllval(tcp, "%llu, ", 1);
else
@@ -674,7 +674,7 @@
{
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
printllval(tcp, "%llu", 1);
}
return 0;
@@ -771,7 +771,7 @@
struct solstat statbuf;
if (umove(tcp, addr, &statbuf) < 0) {
- tprintf("{...}");
+ tprints("{...}");
return;
}
if (!abbrev(tcp)) {
@@ -805,7 +805,7 @@
tprintf("st_ctime=%s}", sprinttime(statbuf.st_ctime.tv_sec));
}
else
- tprintf("...}");
+ tprints("...}");
}
#if defined (SPARC64)
@@ -815,7 +815,7 @@
struct stat_sparc64 statbuf;
if (umove(tcp, addr, &statbuf) < 0) {
- tprintf("{...}");
+ tprints("{...}");
return;
}
@@ -850,10 +850,10 @@
tprintf("st_atime=%s, ", sprinttime(statbuf.st_atime));
tprintf("st_mtime=%s, ", sprinttime(statbuf.st_mtime));
tprintf("st_ctime=%s", sprinttime(statbuf.st_ctime));
- tprintf("}");
+ tprints("}");
}
else
- tprintf("...}");
+ tprints("...}");
}
#endif /* SPARC64 */
#endif /* LINUXSPARC */
@@ -886,7 +886,7 @@
struct stat_powerpc32 statbuf;
if (umove(tcp, addr, &statbuf) < 0) {
- tprintf("{...}");
+ tprints("{...}");
return;
}
@@ -916,10 +916,10 @@
tprintf("st_atime=%s, ", sprinttime(statbuf.st_atime));
tprintf("st_mtime=%s, ", sprinttime(statbuf.st_mtime));
tprintf("st_ctime=%s", sprinttime(statbuf.st_ctime));
- tprintf("}");
+ tprints("}");
}
else
- tprintf("...}");
+ tprints("...}");
}
#endif /* LINUX && POWERPC64 */
@@ -951,7 +951,7 @@
{
if (entering(tcp)) {
printpath(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
printflags(fileflags, tcp->u_arg[1], "UF_???");
}
return 0;
@@ -1012,7 +1012,7 @@
tprintf("st_mtime=%s, ", sprinttime(statbuf->st_mtime));
tprintf("st_ctime=%s", sprinttime(statbuf->st_ctime));
#if HAVE_STRUCT_STAT_ST_FLAGS
- tprintf(", st_flags=");
+ tprints(", st_flags=");
printflags(fileflags, statbuf->st_flags, "UF_???");
#endif
#if HAVE_STRUCT_STAT_ST_ACLCNT
@@ -1028,10 +1028,10 @@
#if HAVE_STRUCT_STAT_ST_GEN
tprintf(", st_gen=%u", statbuf->st_gen);
#endif
- tprintf("}");
+ tprints("}");
}
else
- tprintf("...}");
+ tprints("...}");
}
@@ -1041,7 +1041,7 @@
struct stat statbuf;
if (!addr) {
- tprintf("NULL");
+ tprints("NULL");
return;
}
if (syserror(tcp) || !verbose(tcp)) {
@@ -1070,7 +1070,7 @@
#endif
if (umove(tcp, addr, &statbuf) < 0) {
- tprintf("{...}");
+ tprints("{...}");
return;
}
@@ -1121,7 +1121,7 @@
#endif
if (!addr) {
- tprintf("NULL");
+ tprints("NULL");
return;
}
if (syserror(tcp) || !verbose(tcp)) {
@@ -1150,7 +1150,7 @@
#endif
if (umove(tcp, addr, &statbuf) < 0) {
- tprintf("{...}");
+ tprints("{...}");
return;
}
@@ -1207,7 +1207,7 @@
tprintf("st_mtime=%s, ", sprinttime(statbuf.st_mtime));
tprintf("st_ctime=%s", sprinttime(statbuf.st_ctime));
#if HAVE_STRUCT_STAT_ST_FLAGS
- tprintf(", st_flags=");
+ tprints(", st_flags=");
printflags(fileflags, statbuf.st_flags, "UF_???");
#endif
#if HAVE_STRUCT_STAT_ST_ACLCNT
@@ -1223,10 +1223,10 @@
#if HAVE_STRUCT_STAT_ST_GEN
tprintf(", st_gen=%u", statbuf.st_gen);
#endif
- tprintf("}");
+ tprints("}");
}
else
- tprintf("...}");
+ tprints("...}");
}
#endif /* HAVE_STAT64 */
@@ -1257,7 +1257,7 @@
struct stat newstatbuf;
if (!addr) {
- tprintf("NULL");
+ tprints("NULL");
return;
}
if (syserror(tcp) || !verbose(tcp)) {
@@ -1273,7 +1273,7 @@
#endif /* LINUXSPARC */
if (umove(tcp, addr, &statbuf) < 0) {
- tprintf("{...}");
+ tprints("{...}");
return;
}
@@ -1288,7 +1288,7 @@
{
if (entering(tcp)) {
printpath(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
} else {
printstat(tcp, tcp->u_arg[1]);
}
@@ -1302,7 +1302,7 @@
#ifdef HAVE_STAT64
if (entering(tcp)) {
printpath(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
} else {
printstat64(tcp, tcp->u_arg[1]);
}
@@ -1328,7 +1328,7 @@
if (entering(tcp)) {
print_dirfd(tcp, tcp->u_arg[0]);
printpath(tcp, tcp->u_arg[1]);
- tprintf(", ");
+ tprints(", ");
} else {
#ifdef POWERPC64
if (current_personality == 0)
@@ -1340,7 +1340,7 @@
#else
printstat(tcp, tcp->u_arg[2]);
#endif
- tprintf(", ");
+ tprints(", ");
printflags(fstatatflags, tcp->u_arg[3], "AT_???");
}
return 0;
@@ -1353,7 +1353,7 @@
{
if (entering(tcp)) {
printpath(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
} else {
printoldstat(tcp, tcp->u_arg[1]);
}
@@ -1367,7 +1367,7 @@
{
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
} else {
printstat(tcp, tcp->u_arg[1]);
}
@@ -1381,7 +1381,7 @@
#ifdef HAVE_STAT64
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
} else {
printstat64(tcp, tcp->u_arg[1]);
}
@@ -1397,7 +1397,7 @@
{
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
} else {
printoldstat(tcp, tcp->u_arg[1]);
}
@@ -1411,7 +1411,7 @@
{
if (entering(tcp)) {
printpath(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
} else {
printstat(tcp, tcp->u_arg[1]);
}
@@ -1425,7 +1425,7 @@
#ifdef HAVE_STAT64
if (entering(tcp)) {
printpath(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
} else {
printstat64(tcp, tcp->u_arg[1]);
}
@@ -1441,7 +1441,7 @@
{
if (entering(tcp)) {
printpath(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
} else {
printoldstat(tcp, tcp->u_arg[1]);
}
@@ -1458,7 +1458,7 @@
if (entering(tcp)) {
tprintf("%ld, ", tcp->u_arg[0]);
printpath(tcp, tcp->u_arg[1]);
- tprintf(", ");
+ tprints(", ");
} else {
#ifdef _STAT64_VER
if (tcp->u_arg[0] == _STAT64_VER)
@@ -1492,7 +1492,7 @@
if (entering(tcp)) {
tprintf("%ld, ", tcp->u_arg[0]);
printpath(tcp, tcp->u_arg[1]);
- tprintf(", ");
+ tprints(", ");
} else {
#ifdef _STAT64_VER
if (tcp->u_arg[0] == _STAT64_VER)
@@ -1563,7 +1563,7 @@
{
if (entering(tcp)) {
printpath(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
printxval(aclcmds, tcp->u_arg[1], "???ACL???");
tprintf(", %ld", tcp->u_arg[2]);
/*
@@ -1573,7 +1573,7 @@
if (tcp->u_arg[3])
tprintf(", %#lx", tcp->u_arg[3]);
else
- tprintf(", NULL");
+ tprints(", NULL");
}
return 0;
}
@@ -1593,7 +1593,7 @@
if (tcp->u_arg[3])
tprintf(", %#lx", tcp->u_arg[3]);
else
- tprintf(", NULL");
+ tprints(", NULL");
}
return 0;
}
@@ -1628,7 +1628,7 @@
if (tcp->u_arg[4])
tprintf(", %#lx", tcp->u_arg[4]);
else
- tprintf(", NULL");
+ tprints(", NULL");
}
return 0;
}
@@ -1703,7 +1703,7 @@
return;
}
if (umove(tcp, addr, &statbuf) < 0) {
- tprintf("{...}");
+ tprints("{...}");
return;
}
#ifdef ALPHA
@@ -1733,7 +1733,7 @@
#ifdef _STATFS_F_FRSIZE
tprintf(", f_frsize=%lu", (unsigned long)statbuf.f_frsize);
#endif
- tprintf("}");
+ tprints("}");
}
int
@@ -1741,7 +1741,7 @@
{
if (entering(tcp)) {
printpath(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
} else {
printstatfs(tcp, tcp->u_arg[1]);
}
@@ -1753,7 +1753,7 @@
{
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
} else {
printstatfs(tcp, tcp->u_arg[1]);
}
@@ -1771,7 +1771,7 @@
return;
}
if (umove(tcp, addr, &statbuf) < 0) {
- tprintf("{...}");
+ tprints("{...}");
return;
}
tprintf("{f_type=%s, f_bsize=%llu, f_blocks=%llu, f_bfree=%llu, ",
@@ -1788,7 +1788,7 @@
#ifdef _STATFS_F_FRSIZE
tprintf(", f_frsize=%llu", (unsigned long long)statbuf.f_frsize);
#endif
- tprintf("}");
+ tprints("}");
}
int
@@ -1801,7 +1801,7 @@
if (tcp->u_arg[1] == sizeof(struct statfs64))
printstatfs64(tcp, tcp->u_arg[2]);
else
- tprintf("{???}");
+ tprints("{???}");
}
return 0;
}
@@ -1816,7 +1816,7 @@
if (tcp->u_arg[1] == sizeof(struct statfs64))
printstatfs64(tcp, tcp->u_arg[2]);
else
- tprintf("{???}");
+ tprints("{???}");
}
return 0;
}
@@ -1829,7 +1829,7 @@
{
if (entering(tcp)) {
printpath(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
} else {
printstatfs(tcp, tcp->u_arg[1]);
tprintf(", %lu", tcp->u_arg[2]);
@@ -1867,7 +1867,7 @@
if (syserror(tcp) || !verbose(tcp))
tprintf("%#lx", tcp->u_arg[1]);
else if (umove(tcp, tcp->u_arg[1], &statbuf) < 0)
- tprintf("{...}");
+ tprints("{...}");
else {
tprintf("{f_tfree=%lu, f_tinode=%lu, ",
statbuf.f_tfree, statbuf.f_tinode);
@@ -1888,7 +1888,7 @@
{
if (entering(tcp)) {
printpath(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
printpath(tcp, tcp->u_arg[1]);
}
return 0;
@@ -1974,7 +1974,7 @@
{
if (entering(tcp)) {
printpath(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
printpath(tcp, tcp->u_arg[1]);
}
return 0;
@@ -1987,10 +1987,10 @@
if (entering(tcp)) {
print_dirfd(tcp, tcp->u_arg[0]);
printpath(tcp, tcp->u_arg[1]);
- tprintf(", ");
+ tprints(", ");
print_dirfd(tcp, tcp->u_arg[2]);
printpath(tcp, tcp->u_arg[3]);
- tprintf(", ");
+ tprints(", ");
printfd(tcp, tcp->u_arg[4]);
}
return 0;
@@ -2021,7 +2021,7 @@
if (entering(tcp)) {
print_dirfd(tcp, tcp->u_arg[0]);
printpath(tcp, tcp->u_arg[1]);
- tprintf(", ");
+ tprints(", ");
printflags(unlinkatflags, tcp->u_arg[2], "AT_???");
}
return 0;
@@ -2033,7 +2033,7 @@
{
if (entering(tcp)) {
printpath(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
printpath(tcp, tcp->u_arg[1]);
}
return 0;
@@ -2045,7 +2045,7 @@
{
if (entering(tcp)) {
printpath(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
print_dirfd(tcp, tcp->u_arg[1]);
printpath(tcp, tcp->u_arg[2]);
}
@@ -2058,7 +2058,7 @@
{
if (entering(tcp)) {
printpath(tcp, tcp->u_arg[offset]);
- tprintf(", ");
+ tprints(", ");
} else {
if (syserror(tcp))
tprintf("%#lx", tcp->u_arg[offset + 1]);
@@ -2090,7 +2090,7 @@
{
if (entering(tcp)) {
printpath(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
printpath(tcp, tcp->u_arg[1]);
}
return 0;
@@ -2103,7 +2103,7 @@
if (entering(tcp)) {
print_dirfd(tcp, tcp->u_arg[0]);
printpath(tcp, tcp->u_arg[1]);
- tprintf(", ");
+ tprints(", ");
print_dirfd(tcp, tcp->u_arg[2]);
printpath(tcp, tcp->u_arg[3]);
}
@@ -2131,7 +2131,7 @@
printpath(tcp, tcp->u_arg[1]);
printuid(", ", tcp->u_arg[2]);
printuid(", ", tcp->u_arg[3]);
- tprintf(", ");
+ tprints(", ");
printflags(fstatatflags, tcp->u_arg[4], "AT_???");
}
return 0;
@@ -2191,7 +2191,7 @@
{
if (entering(tcp)) {
printpath(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
printtv_bitness(tcp, tcp->u_arg[1], BITNESS_32, 0);
}
return 0;
@@ -2203,18 +2203,18 @@
{
if (entering(tcp)) {
printpath(tcp, tcp->u_arg[offset]);
- tprintf(", ");
+ tprints(", ");
if (tcp->u_arg[offset + 1] == 0)
- tprintf("NULL");
+ tprints("NULL");
else {
- tprintf("{");
+ tprints("{");
printtv_bitness(tcp, tcp->u_arg[offset + 1],
BITNESS_CURRENT, special);
- tprintf(", ");
+ tprints(", ");
printtv_bitness(tcp, tcp->u_arg[offset + 1]
+ sizeof(struct timeval),
BITNESS_CURRENT, special);
- tprintf("}");
+ tprints("}");
}
}
return 0;
@@ -2241,7 +2241,7 @@
if (entering(tcp)) {
print_dirfd(tcp, tcp->u_arg[0]);
decode_utimes(tcp, 1, 1);
- tprintf(", ");
+ tprints(", ");
printflags(utimensatflags, tcp->u_arg[3], "AT_???");
}
return 0;
@@ -2258,15 +2258,15 @@
if (entering(tcp)) {
printpath(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
if (!tcp->u_arg[1])
- tprintf("NULL");
+ tprints("NULL");
else if (!verbose(tcp))
tprintf("%#lx", tcp->u_arg[1]);
else if (umoven(tcp, tcp->u_arg[1],
2 * personality_wordsize[current_personality],
(char *) &u) < 0)
- tprintf("[?, ?]");
+ tprints("[?, ?]");
else if (personality_wordsize[current_personality]
== sizeof u.utl[0]) {
tprintf("[%s,", sprinttime(u.utl[0]));
@@ -2360,13 +2360,13 @@
return;
}
if (umove(tcp, addr, &d) < 0) {
- tprintf("{...}");
+ tprints("{...}");
return;
}
tprintf("{d_ino=%ld, ", (unsigned long) d.d_ino);
- tprintf("d_name=");
+ tprints("d_name=");
printpathn(tcp, (long) ((struct dirent *) addr)->d_name, d.d_reclen);
- tprintf("}");
+ tprints("}");
}
int
@@ -2374,7 +2374,7 @@
{
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
} else {
if (syserror(tcp) || tcp->u_rval == 0 || !verbose(tcp))
tprintf("%#lx", tcp->u_arg[1]);
@@ -2413,7 +2413,7 @@
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
return 0;
}
if (syserror(tcp) || !verbose(tcp)) {
@@ -2430,7 +2430,7 @@
return 0;
}
if (!abbrev(tcp))
- tprintf("{");
+ tprints("{");
for (i = 0; i < len;) {
struct kernel_dirent *d = (struct kernel_dirent *) &buf[i];
#ifdef LINUX
@@ -2470,14 +2470,14 @@
}
#endif /* FREEBSD */
if (!d->d_reclen) {
- tprintf("/* d_reclen == 0, problem here */");
+ tprints("/* d_reclen == 0, problem here */");
break;
}
i += d->d_reclen;
dents++;
}
if (!abbrev(tcp))
- tprintf("}");
+ tprints("}");
else
tprintf("/* %u entries */", dents);
tprintf(", %lu", tcp->u_arg[2]);
@@ -2495,7 +2495,7 @@
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
return 0;
}
if (syserror(tcp) || !verbose(tcp)) {
@@ -2512,7 +2512,7 @@
return 0;
}
if (!abbrev(tcp))
- tprintf("{");
+ tprints("{");
for (i = 0; i < len;) {
struct dirent64 *d = (struct dirent64 *) &buf[i];
#if defined(LINUX) || defined(SVR4)
@@ -2522,9 +2522,9 @@
d->d_ino,
d->d_off);
#ifdef LINUX
- tprintf("d_type=");
+ tprints("d_type=");
printxval(direnttypes, d->d_type, "DT_???");
- tprintf(", ");
+ tprints(", ");
#endif
tprintf("d_reclen=%u, d_name=\"%s\"}",
d->d_reclen, d->d_name);
@@ -2540,14 +2540,14 @@
}
#endif /* SUNOS4 */
if (!d->d_reclen) {
- tprintf("/* d_reclen == 0, problem here */");
+ tprints("/* d_reclen == 0, problem here */");
break;
}
i += d->d_reclen;
dents++;
}
if (!abbrev(tcp))
- tprintf("}");
+ tprints("}");
else
tprintf("/* %u entries */", dents);
tprintf(", %lu", tcp->u_arg[2]);
@@ -2566,7 +2566,7 @@
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
return 0;
}
if (syserror(tcp) || !verbose(tcp)) {
@@ -2583,7 +2583,7 @@
return 0;
}
if (!abbrev(tcp))
- tprintf("{");
+ tprints("{");
for (i = 0; i < len;) {
struct kernel_dirent *d = (struct kernel_dirent *) &buf[i];
if (!abbrev(tcp)) {
@@ -2594,14 +2594,14 @@
d->d_namlen, d->d_namlen, d->d_name);
}
if (!d->d_reclen) {
- tprintf("/* d_reclen == 0, problem here */");
+ tprints("/* d_reclen == 0, problem here */");
break;
}
i += d->d_reclen;
dents++;
}
if (!abbrev(tcp))
- tprintf("}");
+ tprints("}");
else
tprintf("/* %u entries */", dents);
free(buf);
@@ -2683,7 +2683,7 @@
}
else {
if (tcp->u_arg[5] == 0)
- tprintf(", NULL");
+ tprints(", NULL");
else if (syserror(tcp)
|| umove(tcp, tcp->u_arg[5], &res) < 0)
tprintf(", %#lx", tcp->u_arg[5]);
@@ -2709,7 +2709,7 @@
if (exiting(tcp)) {
if (tcp->u_arg[0] == 0)
- tprintf("NULL");
+ tprints("NULL");
else if (syserror(tcp)
|| umove(tcp, tcp->u_arg[0], &res) < 0)
tprintf("%#lx", tcp->u_arg[0]);
@@ -2775,10 +2775,10 @@
{
if (entering(tcp)) {
printpath(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
printstr(tcp, tcp->u_arg[1], -1);
print_xattr_val(tcp, 0, tcp->u_arg[2], tcp->u_arg[3], tcp->u_arg[3]);
- tprintf(", ");
+ tprints(", ");
printflags(xattrflags, tcp->u_arg[4], "XATTR_???");
}
return 0;
@@ -2789,10 +2789,10 @@
{
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
printstr(tcp, tcp->u_arg[1], -1);
print_xattr_val(tcp, 0, tcp->u_arg[2], tcp->u_arg[3], tcp->u_arg[3]);
- tprintf(", ");
+ tprints(", ");
printflags(xattrflags, tcp->u_arg[4], "XATTR_???");
}
return 0;
@@ -2803,7 +2803,7 @@
{
if (entering(tcp)) {
printpath(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
printstr(tcp, tcp->u_arg[1], -1);
} else {
print_xattr_val(tcp, syserror(tcp), tcp->u_arg[2], tcp->u_arg[3],
@@ -2817,7 +2817,7 @@
{
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
printstr(tcp, tcp->u_arg[1], -1);
} else {
print_xattr_val(tcp, syserror(tcp), tcp->u_arg[2], tcp->u_arg[3],
@@ -2855,7 +2855,7 @@
{
if (entering(tcp)) {
printpath(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
printstr(tcp, tcp->u_arg[1], -1);
}
return 0;
@@ -2866,7 +2866,7 @@
{
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
printstr(tcp, tcp->u_arg[1], -1);
}
return 0;
@@ -2891,7 +2891,7 @@
if (entering(tcp)) {
int argn;
printfd(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
argn = printllval(tcp, "%lld", 1);
tprintf(", %ld, ", tcp->u_arg[argn++]);
printxval(advise, tcp->u_arg[argn], "POSIX_FADV_???");
@@ -2907,7 +2907,7 @@
if (entering(tcp)) {
int argn;
printfd(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
#if defined ARM || defined POWERPC
argn = printllval(tcp, "%lld, ", 2);
#else
@@ -2959,9 +2959,9 @@
{
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
printpath(tcp, tcp->u_arg[1]);
- tprintf(", ");
+ tprints(", ");
printflags(inotify_modes, tcp->u_arg[2], "IN_???");
}
return 0;
@@ -2991,7 +2991,7 @@
if (entering(tcp)) {
int argn;
printfd(tcp, tcp->u_arg[0]); /* fd */
- tprintf(", ");
+ tprints(", ");
tprintf("%#lo, ", tcp->u_arg[1]); /* mode */
argn = printllval(tcp, "%llu, ", 2); /* offset */
printllval(tcp, "%llu", argn); /* len */
diff --git a/io.c b/io.c
index fa51cef..758592d 100644
--- a/io.c
+++ b/io.c
@@ -51,7 +51,7 @@
{
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
} else {
if (syserror(tcp))
tprintf("%#lx", tcp->u_arg[1]);
@@ -67,7 +67,7 @@
{
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]);
tprintf(", %lu", tcp->u_arg[2]);
}
@@ -102,7 +102,7 @@
int failed = 0;
if (!len) {
- tprintf("[]");
+ tprints("[]");
return;
}
size = len * sizeof_iov;
@@ -118,27 +118,27 @@
} else {
abbrev_end = end;
}
- tprintf("[");
+ tprints("[");
for (cur = addr; cur < end; cur += sizeof_iov) {
if (cur > addr)
- tprintf(", ");
+ tprints(", ");
if (cur >= abbrev_end) {
- tprintf("...");
+ tprints("...");
break;
}
if (umoven(tcp, cur, sizeof_iov, (char *) &iov) < 0) {
- tprintf("?");
+ tprints("?");
failed = 1;
break;
}
- tprintf("{");
+ tprints("{");
if (decode_iov)
printstr(tcp, (long) iov_iov_base, iov_iov_len);
else
tprintf("%#lx", (long) iov_iov_base);
tprintf(", %lu}", (unsigned long)iov_iov_len);
}
- tprintf("]");
+ tprints("]");
if (failed)
tprintf(" %#lx", addr);
#undef sizeof_iov
@@ -151,7 +151,7 @@
{
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
} else {
if (syserror(tcp)) {
tprintf("%#lx, %lu",
@@ -169,7 +169,7 @@
{
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
tprint_iov(tcp, tcp->u_arg[2], tcp->u_arg[1], 1);
tprintf(", %lu", tcp->u_arg[2]);
}
@@ -184,7 +184,7 @@
{
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
} else {
if (syserror(tcp))
tprintf("%#lx", tcp->u_arg[1]);
@@ -206,7 +206,7 @@
{
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]);
#if UNIXWARE
/* off_t is signed int */
@@ -229,7 +229,7 @@
{
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
printfd(tcp, tcp->u_arg[1]);
tprintf(", %llu, %lu",
LONG_LONG(tcp->u_arg[2], tcp->u_arg[3]),
@@ -238,14 +238,14 @@
off_t offset;
if (!tcp->u_arg[5])
- tprintf(", NULL");
+ tprints(", NULL");
else {
struct sf_hdtr hdtr;
if (umove(tcp, tcp->u_arg[5], &hdtr) < 0)
tprintf(", %#lx", tcp->u_arg[5]);
else {
- tprintf(", { ");
+ tprints(", { ");
tprint_iov(tcp, hdtr.hdr_cnt, hdtr.headers, 1);
tprintf(", %u, ", hdtr.hdr_cnt);
tprint_iov(tcp, hdtr.trl_cnt, hdtr.trailers, 1);
@@ -253,7 +253,7 @@
}
}
if (!tcp->u_arg[6])
- tprintf(", NULL");
+ tprints(", NULL");
else if (umove(tcp, tcp->u_arg[6], &offset) < 0)
tprintf(", %#lx", tcp->u_arg[6]);
else
@@ -282,7 +282,7 @@
{
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
} else {
if (syserror(tcp))
tprintf("%#lx", tcp->u_arg[1]);
@@ -299,7 +299,7 @@
{
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]);
tprintf(", %lu, ", tcp->u_arg[2]);
printllval(tcp, "%llu", PREAD_OFFSET_ARG);
@@ -313,7 +313,7 @@
{
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
} else {
if (syserror(tcp)) {
tprintf("%#lx, %lu", tcp->u_arg[1], tcp->u_arg[2]);
@@ -331,7 +331,7 @@
{
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
tprint_iov(tcp, tcp->u_arg[2], tcp->u_arg[1], 1);
tprintf(", %lu, ", tcp->u_arg[2]);
printllval(tcp, "%llu", PREAD_OFFSET_ARG);
@@ -347,11 +347,11 @@
off_t offset;
printfd(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
printfd(tcp, tcp->u_arg[1]);
- tprintf(", ");
+ tprints(", ");
if (!tcp->u_arg[2])
- tprintf("NULL");
+ tprints("NULL");
else if (umove(tcp, tcp->u_arg[2], &offset) < 0)
tprintf("%#lx", tcp->u_arg[2]);
else
@@ -368,11 +368,11 @@
loff_t offset;
printfd(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
printfd(tcp, tcp->u_arg[1]);
- tprintf(", ");
+ tprints(", ");
if (!tcp->u_arg[2])
- tprintf("NULL");
+ tprints("NULL");
else if (umove(tcp, tcp->u_arg[2], &offset) < 0)
tprintf("%#lx", tcp->u_arg[2]);
else
@@ -390,7 +390,7 @@
{
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
} else {
if (syserror(tcp))
tprintf("%#lx", tcp->u_arg[1]);
@@ -407,7 +407,7 @@
{
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]);
tprintf(", %lu, ", tcp->u_arg[2]);
printllval(tcp, "%#llx", 3);
@@ -423,7 +423,7 @@
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
iop = ioctl_lookup(tcp->u_arg[1]);
if (iop) {
tprints(iop->symbol);
diff --git a/ipc.c b/ipc.c
index 046c12f..25539a6 100644
--- a/ipc.c
+++ b/ipc.c
@@ -164,10 +164,10 @@
if (tcp->u_arg[0])
tprintf("%#lx", tcp->u_arg[0]);
else
- tprintf("IPC_PRIVATE");
- tprintf(", ");
+ tprints("IPC_PRIVATE");
+ tprints(", ");
if (printflags(resource_flags, tcp->u_arg[1] & ~0777, NULL) != 0)
- tprintf("|");
+ tprints("|");
tprintf("%#lo", tcp->u_arg[1] & 0777);
}
return 0;
@@ -175,7 +175,7 @@
#ifdef IPC_64
# define PRINTCTL(flagset, arg, dflt) \
- if ((arg) & IPC_64) tprintf("IPC_64|"); \
+ if ((arg) & IPC_64) tprints("IPC_64|"); \
printxval((flagset), (arg) &~ IPC_64, dflt)
#else
# define PRINTCTL printxval
@@ -219,7 +219,7 @@
} else {
tprintf("{%lu, ", mtype);
printstr(tcp, addr + sizeof(mtype), count);
- tprintf("}");
+ tprints("}");
}
tprintf(", %lu, ", count);
printflags(msg_flags, flags, "MSG_???");
@@ -250,7 +250,7 @@
} else {
tprintf("{%lu, ", mtype);
printstr(tcp, addr + sizeof(mtype), count);
- tprintf("}");
+ tprints("}");
}
tprintf(", %lu, %ld, ", count, msgtyp);
}
@@ -301,10 +301,10 @@
for (i = 0; i < max_count; ++i) {
struct sembuf sb;
if (i)
- tprintf(", ");
+ tprints(", ");
if (umove(tcp, addr + i * sizeof(struct sembuf), &sb) < 0) {
if (i) {
- tprintf("{???}");
+ tprints("{???}");
break;
} else {
tprintf("%#lx, %lu", addr, count);
@@ -312,15 +312,15 @@
}
} else {
if (!i)
- tprintf("{");
+ tprints("{");
tprintf("{%u, %d, ", sb.sem_num, sb.sem_op);
printflags(semop_flags, sb.sem_flg, "SEM_???");
- tprintf("}");
+ tprints("}");
}
}
if (i < max_count || max_count < count)
- tprintf(", ...");
+ tprints(", ...");
tprintf("}, %lu", count);
}
@@ -345,11 +345,11 @@
tprintf("%lu, ", tcp->u_arg[0]);
if (indirect_ipccall(tcp)) {
tprint_sembuf(tcp, tcp->u_arg[3], tcp->u_arg[1]);
- tprintf(", ");
+ tprints(", ");
printtv(tcp, tcp->u_arg[5]);
} else {
tprint_sembuf(tcp, tcp->u_arg[1], tcp->u_arg[2]);
- tprintf(", ");
+ tprints(", ");
printtv(tcp, tcp->u_arg[3]);
}
}
@@ -363,11 +363,11 @@
if (tcp->u_arg[0])
tprintf("%#lx", tcp->u_arg[0]);
else
- tprintf("IPC_PRIVATE");
+ tprints("IPC_PRIVATE");
tprintf(", %lu", tcp->u_arg[1]);
- tprintf(", ");
+ tprints(", ");
if (printflags(resource_flags, tcp->u_arg[2] & ~0777, NULL) != 0)
- tprintf("|");
+ tprints("|");
tprintf("%#lo", tcp->u_arg[2] & 0777);
}
return 0;
@@ -390,11 +390,11 @@
if (tcp->u_arg[0])
tprintf("%#lx", tcp->u_arg[0]);
else
- tprintf("IPC_PRIVATE");
+ tprints("IPC_PRIVATE");
tprintf(", %lu", tcp->u_arg[1]);
- tprintf(", ");
+ tprints(", ");
if (printflags(shm_resource_flags, tcp->u_arg[2] & ~0777, NULL) != 0)
- tprintf("|");
+ tprints("|");
tprintf("%#lo", tcp->u_arg[2] & 0777);
}
return 0;
@@ -424,11 +424,11 @@
tprintf("%lu", tcp->u_arg[0]);
if (indirect_ipccall(tcp)) {
tprintf(", %#lx", tcp->u_arg[3]);
- tprintf(", ");
+ tprints(", ");
printflags(shm_flags, tcp->u_arg[1], "SHM_???");
} else {
tprintf(", %#lx", tcp->u_arg[1]);
- tprintf(", ");
+ tprints(", ");
printflags(shm_flags, tcp->u_arg[2], "SHM_???");
}
if (syserror(tcp))
@@ -464,7 +464,7 @@
{
if (entering(tcp)) {
printpath(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
/* flags */
tprint_open_modes(tcp->u_arg[1]);
if (tcp->u_arg[1] & O_CREAT) {
@@ -475,7 +475,7 @@
/* mode */
tprintf(", %#lo, ", tcp->u_arg[2]);
if (umove(tcp, tcp->u_arg[3], &attr) < 0)
- tprintf("{ ??? }");
+ tprints("{ ??? }");
else
tprintf("{mq_maxmsg=%ld, mq_msgsize=%ld}",
attr.mq_maxmsg, attr.mq_msgsize);
@@ -524,17 +524,17 @@
printmqattr(struct tcb *tcp, long addr)
{
if (addr == 0)
- tprintf("NULL");
+ tprints("NULL");
else {
# ifndef HAVE_MQUEUE_H
tprintf("%#lx", addr);
# else
struct mq_attr attr;
if (umove(tcp, addr, &attr) < 0) {
- tprintf("{...}");
+ tprints("{...}");
return;
}
- tprintf("{mq_flags=");
+ tprints("{mq_flags=");
tprint_open_modes(attr.mq_flags);
tprintf(", mq_maxmsg=%ld, mq_msgsize=%ld, mq_curmsg=%ld}",
attr.mq_maxmsg, attr.mq_msgsize, attr.mq_curmsgs);
@@ -548,7 +548,7 @@
if (entering(tcp)) {
tprintf("%ld, ", tcp->u_arg[0]);
printmqattr(tcp, tcp->u_arg[1]);
- tprintf(", ");
+ tprints(", ");
} else
printmqattr(tcp, tcp->u_arg[2]);
return 0;
diff --git a/mem.c b/mem.c
index 43b422f..e440e9f 100644
--- a/mem.c
+++ b/mem.c
@@ -204,19 +204,19 @@
if (flags & _MAP_CACHE_INCOHERENT) {
flags &= ~_MAP_CACHE_INCOHERENT;
if (home == MAP_CACHE_HOME_NONE) {
- tprintf("|MAP_CACHE_INCOHERENT");
+ tprints("|MAP_CACHE_INCOHERENT");
return flags;
}
- tprintf("|_MAP_CACHE_INCOHERENT");
+ tprints("|_MAP_CACHE_INCOHERENT");
}
switch (home) {
case 0: break;
- case MAP_CACHE_HOME_HERE: tprintf("|MAP_CACHE_HOME_HERE"); break;
- case MAP_CACHE_HOME_NONE: tprintf("|MAP_CACHE_HOME_NONE"); break;
- case MAP_CACHE_HOME_SINGLE: tprintf("|MAP_CACHE_HOME_SINGLE"); break;
- case MAP_CACHE_HOME_TASK: tprintf("|MAP_CACHE_HOME_TASK"); break;
- case MAP_CACHE_HOME_HASH: tprintf("|MAP_CACHE_HOME_HASH"); break;
+ case MAP_CACHE_HOME_HERE: tprints("|MAP_CACHE_HOME_HERE"); break;
+ case MAP_CACHE_HOME_NONE: tprints("|MAP_CACHE_HOME_NONE"); break;
+ case MAP_CACHE_HOME_SINGLE: tprints("|MAP_CACHE_HOME_SINGLE"); break;
+ case MAP_CACHE_HOME_TASK: tprints("|MAP_CACHE_HOME_TASK"); break;
+ case MAP_CACHE_HOME_HASH: tprints("|MAP_CACHE_HOME_HASH"); break;
default:
tprintf("|MAP_CACHE_HOME(%d)",
(home >> _MAP_CACHE_HOME_SHIFT) );
@@ -234,14 +234,14 @@
if (entering(tcp)) {
/* addr */
if (!u_arg[0])
- tprintf("NULL, ");
+ tprints("NULL, ");
else
tprintf("%#lx, ", u_arg[0]);
/* len */
tprintf("%lu, ", u_arg[1]);
/* prot */
printflags(mmap_prot, u_arg[2], "PROT_???");
- tprintf(", ");
+ tprints(", ");
/* flags */
#ifdef MAP_TYPE
printxval(mmap_flags, u_arg[3] & MAP_TYPE, "MAP_???");
@@ -254,7 +254,7 @@
printflags(mmap_flags, u_arg[3], "MAP_???");
#endif
/* fd */
- tprintf(", ");
+ tprints(", ");
printfd(tcp, u_arg[4]);
/* offset */
tprintf(", %#llx", offset);
@@ -357,7 +357,7 @@
tprintf("%lu, ", u_arg[1]);
/* prot */
printflags(mmap_prot, u_arg[2], "PROT_???");
- tprintf(", ");
+ tprints(", ");
/* flags */
#ifdef MAP_TYPE
printxval(mmap_flags, u_arg[3] & MAP_TYPE, "MAP_???");
@@ -366,7 +366,7 @@
printflags(mmap_flags, u_arg[3], "MAP_???");
#endif
/* fd */
- tprintf(", ");
+ tprints(", ");
printfd(tcp, u_arg[4]);
/* offset */
#if !defined(LINUX) || defined(ALPHA)
@@ -543,7 +543,7 @@
printflags(mctl_funcs, function, "MC_???");
/* arg */
arg = tcp->u_arg[3];
- tprintf(", ");
+ tprints(", ");
switch (function) {
case MC_SYNC:
printflags(mctl_sync, arg, "MS_???");
@@ -576,15 +576,15 @@
umoven(tcp, tcp->u_arg[2], len, vec) < 0)
tprintf("%#lx", tcp->u_arg[2]);
else {
- tprintf("[");
+ tprints("[");
for (i = 0; i < len; i++) {
if (abbrev(tcp) && i >= max_strlen) {
- tprintf("...");
+ tprints("...");
break;
}
- tprintf((vec[i] & 1) ? "1" : "0");
+ tprints((vec[i] & 1) ? "1" : "0");
}
- tprintf("]");
+ tprints("]");
}
free(vec);
}
@@ -636,7 +636,7 @@
else {
tprintf(", {entry_number:%d, ", copy.entry_number);
if (!verbose(tcp))
- tprintf("...}");
+ tprints("...}");
else {
print_ldt_entry(©);
}
@@ -656,13 +656,13 @@
tprintf("{entry_number:%d -> ",
copy.entry_number);
else
- tprintf("{entry_number:");
+ tprints("{entry_number:");
}
} else {
if (umove(tcp, tcp->u_arg[0], ©) != -1) {
tprintf("%d, ", copy.entry_number);
if (!verbose(tcp))
- tprintf("...}");
+ tprints("...}");
else {
print_ldt_entry(©);
}
@@ -682,7 +682,7 @@
if (umove(tcp, tcp->u_arg[0], ©) != -1) {
tprintf("{entry_number:%d, ", copy.entry_number);
if (!verbose(tcp))
- tprintf("...}");
+ tprints("...}");
else {
print_ldt_entry(©);
}
@@ -793,22 +793,22 @@
} else {
abbrev_end = end;
}
- tprintf(", {");
+ tprints(", {");
for (cur = ptr; cur < end; cur += sizeof(long)) {
if (cur > ptr)
- tprintf(", ");
+ tprints(", ");
if (cur >= abbrev_end) {
- tprintf("...");
+ tprints("...");
break;
}
if (umoven(tcp, cur, sizeof(n), (char *) &n) < 0) {
- tprintf("?");
+ tprints("?");
failed = 1;
break;
}
tprintf("%#0*lx", (int) sizeof(long) * 2 + 2, n);
}
- tprintf("}");
+ tprints("}");
if (failed)
tprintf(" %#lx", ptr);
} else
@@ -823,7 +823,7 @@
tprintf("%#lx, %lu, ", tcp->u_arg[0], tcp->u_arg[1]);
printxval(policies, tcp->u_arg[2], "MPOL_???");
get_nodes(tcp, tcp->u_arg[3], tcp->u_arg[4], 0);
- tprintf(", ");
+ tprints(", ");
printflags(mbindflags, tcp->u_arg[5], "MPOL_???");
}
return 0;
@@ -845,7 +845,7 @@
if (exiting(tcp)) {
int pol;
if (tcp->u_arg[0] == 0)
- tprintf("NULL");
+ tprints("NULL");
else if (syserror(tcp) || umove(tcp, tcp->u_arg[0], &pol) < 0)
tprintf("%#lx", tcp->u_arg[0]);
else
@@ -864,64 +864,64 @@
unsigned long npages = tcp->u_arg[1];
tprintf("%ld, %lu, ", tcp->u_arg[0], npages);
if (tcp->u_arg[2] == 0)
- tprintf("NULL, ");
+ tprints("NULL, ");
else {
int i;
long puser = tcp->u_arg[2];
- tprintf("{");
+ tprints("{");
for (i = 0; i < npages; ++i) {
void *p;
if (i > 0)
- tprintf(", ");
+ tprints(", ");
if (umove(tcp, puser, &p) < 0) {
- tprintf("???");
+ tprints("???");
break;
}
tprintf("%p", p);
puser += sizeof(void *);
}
- tprintf("}, ");
+ tprints("}, ");
}
if (tcp->u_arg[3] == 0)
- tprintf("NULL, ");
+ tprints("NULL, ");
else {
int i;
long nodeuser = tcp->u_arg[3];
- tprintf("{");
+ tprints("{");
for (i = 0; i < npages; ++i) {
int node;
if (i > 0)
- tprintf(", ");
+ tprints(", ");
if (umove(tcp, nodeuser, &node) < 0) {
- tprintf("???");
+ tprints("???");
break;
}
tprintf("%#x", node);
nodeuser += sizeof(int);
}
- tprintf("}, ");
+ tprints("}, ");
}
}
if (exiting(tcp)) {
unsigned long npages = tcp->u_arg[1];
if (tcp->u_arg[4] == 0)
- tprintf("NULL, ");
+ tprints("NULL, ");
else {
int i;
long statususer = tcp->u_arg[4];
- tprintf("{");
+ tprints("{");
for (i = 0; i < npages; ++i) {
int status;
if (i > 0)
- tprintf(", ");
+ tprints(", ");
if (umove(tcp, statususer, &status) < 0) {
- tprintf("???");
+ tprints("???");
break;
}
tprintf("%#x", status);
statususer += sizeof(int);
}
- tprintf("}, ");
+ tprints("}, ");
}
printflags(move_pages_flags, tcp->u_arg[5], "MPOL_???");
}
@@ -940,7 +940,7 @@
tprintf("%#lx, %#lx, ", tcp->u_arg[0], tcp->u_arg[1]);
entries = tcp->u_arg[1] >> 16;
if (!entries || !tcp->u_arg[2]) {
- tprintf("{}");
+ tprints("{}");
return 0;
}
cur = tcp->u_arg[2];
@@ -956,12 +956,12 @@
}
else
abbrev_end = end;
- tprintf("{");
+ tprints("{");
for (; cur < end; cur += sizeof(int)) {
if (cur > tcp->u_arg[2])
- tprintf(", ");
+ tprints(", ");
if (cur >= abbrev_end) {
- tprintf("...");
+ tprints("...");
break;
}
if (umove(tcp, cur, &entry) < 0) {
@@ -971,7 +971,7 @@
else
tprintf("%#08x", entry);
}
- tprintf("}");
+ tprints("}");
}
return 0;
diff --git a/net.c b/net.c
index 51a5997..025ae9c 100644
--- a/net.c
+++ b/net.c
@@ -1220,7 +1220,7 @@
char string_addr[100];
if (addr == 0) {
- tprintf("NULL");
+ tprints("NULL");
return;
}
if (!verbose(tcp)) {
@@ -1233,24 +1233,24 @@
memset(&addrbuf, 0, sizeof(addrbuf));
if (umoven(tcp, addr, addrlen, addrbuf.pad) < 0) {
- tprintf("{...}");
+ tprints("{...}");
return;
}
addrbuf.pad[sizeof(addrbuf.pad) - 1] = '\0';
- tprintf("{sa_family=");
+ tprints("{sa_family=");
printxval(addrfams, addrbuf.sa.sa_family, "AF_???");
- tprintf(", ");
+ tprints(", ");
switch (addrbuf.sa.sa_family) {
case AF_UNIX:
if (addrlen == 2) {
- tprintf("NULL");
+ tprints("NULL");
} else if (addrbuf.sau.sun_path[0]) {
- tprintf("path=");
+ tprints("path=");
printpathn(tcp, addr + 2, strlen(addrbuf.sau.sun_path));
} else {
- tprintf("path=@");
+ tprints("path=@");
printpathn(tcp, addr + 3, strlen(addrbuf.sau.sun_path + 1));
}
break;
@@ -1331,12 +1331,12 @@
AF_X25 AF_ROSE etc. still need to be done */
default:
- tprintf("sa_data=");
+ tprints("sa_data=");
printstr(tcp, (long) &((struct sockaddr *) addr)->sa_data,
sizeof addrbuf.sa.sa_data);
break;
}
- tprintf("}");
+ tprints("}");
}
#if HAVE_SENDMSG
@@ -1363,7 +1363,7 @@
tprintf(", {cmsg_len=%u, cmsg_level=", (unsigned) cmsg->cmsg_len);
printxval(socketlayers, cmsg->cmsg_level, "SOL_???");
- tprintf(", cmsg_type=");
+ tprints(", cmsg_type=");
if (cmsg->cmsg_level == SOL_SOCKET) {
unsigned long cmsg_len;
@@ -1376,14 +1376,14 @@
int *fds = (int *) CMSG_DATA(cmsg);
int first = 1;
- tprintf(", {");
+ tprints(", {");
while ((char *) fds < ((char *) cmsg + cmsg_len)) {
if (!first)
- tprintf(", ");
+ tprints(", ");
tprintf("%d", *fds++);
first = 0;
}
- tprintf("}}");
+ tprints("}}");
free(cmsg);
return;
}
@@ -1398,7 +1398,7 @@
}
}
free(cmsg);
- tprintf(", ...}");
+ tprints(", ...}");
}
static void
@@ -1416,13 +1416,13 @@
if (msg->msg_controllen)
printcmsghdr(tcp, (unsigned long) msg->msg_control,
msg->msg_controllen);
- tprintf(", msg_flags=");
+ tprints(", msg_flags=");
printflags(msg_flags, msg->msg_flags, "MSG_???");
#else /* !HAVE_STRUCT_MSGHDR_MSG_CONTROL */
tprintf("msg_accrights=%#lx, msg_accrightslen=%u",
(unsigned long) msg->msg_accrights, msg->msg_accrightslen);
#endif /* !HAVE_STRUCT_MSGHDR_MSG_CONTROL */
- tprintf("}");
+ tprints("}");
}
static void
@@ -1450,7 +1450,7 @@
tprintf("%#lx", addr);
return;
}
- tprintf("{");
+ tprints("{");
do_msghdr(tcp, &mmsg.msg_hdr);
tprintf(", %u}", mmsg.msg_len);
}
@@ -1472,7 +1472,7 @@
flags &= ~SOCK_TYPE_MASK;
if (!flags)
return;
- tprintf("|");
+ tprints("|");
}
printflags(sock_type_flags, flags, "SOCK_???");
}
@@ -1482,9 +1482,9 @@
{
if (entering(tcp)) {
printxval(domains, tcp->u_arg[0], "PF_???");
- tprintf(", ");
+ tprints(", ");
tprint_sock_type(tcp, tcp->u_arg[1]);
- tprintf(", ");
+ tprints(", ");
switch (tcp->u_arg[0]) {
case PF_INET:
#ifdef PF_INET6
@@ -1495,9 +1495,9 @@
#ifdef PF_IPX
case PF_IPX:
/* BTW: I don't believe this.. */
- tprintf("[");
+ tprints("[");
printxval(domains, tcp->u_arg[2], "PF_???");
- tprintf("]");
+ tprints("]");
break;
#endif /* PF_IPX */
default:
@@ -1578,11 +1578,11 @@
} else {
printsock(tcp, tcp->u_arg[1], len);
}
- tprintf(", ");
+ tprints(", ");
printnum_int(tcp, tcp->u_arg[2], "%u");
}
if (flags_arg >= 0) {
- tprintf(", ");
+ tprints(", ");
printflags(sock_type_flags, tcp->u_arg[flags_arg],
"SOCK_???");
}
@@ -1626,7 +1626,7 @@
/* flags */
printflags(msg_flags, tcp->u_arg[3], "MSG_???");
/* to address */
- tprintf(", ");
+ tprints(", ");
printsock(tcp, tcp->u_arg[4], tcp->u_arg[5]);
/* to length */
tprintf(", %lu", tcp->u_arg[5]);
@@ -1643,7 +1643,7 @@
tprintf("%ld, ", tcp->u_arg[0]);
printmsghdr(tcp, tcp->u_arg[1]);
/* flags */
- tprintf(", ");
+ tprints(", ");
printflags(msg_flags, tcp->u_arg[2], "MSG_???");
}
return 0;
@@ -1691,20 +1691,20 @@
/* from address, len */
if (!tcp->u_arg[4] || !tcp->u_arg[5]) {
if (tcp->u_arg[4] == 0)
- tprintf(", NULL");
+ tprints(", NULL");
else
tprintf(", %#lx", tcp->u_arg[4]);
if (tcp->u_arg[5] == 0)
- tprintf(", NULL");
+ tprints(", NULL");
else
tprintf(", %#lx", tcp->u_arg[5]);
return 0;
}
if (umove(tcp, tcp->u_arg[5], &fromlen) < 0) {
- tprintf(", {...}, [?]");
+ tprints(", {...}, [?]");
return 0;
}
- tprintf(", ");
+ tprints(", ");
printsock(tcp, tcp->u_arg[4], tcp->u_arg[5]);
/* from length */
tprintf(", [%u]", fromlen);
@@ -1725,7 +1725,7 @@
else
printmsghdr(tcp, tcp->u_arg[1]);
/* flags */
- tprintf(", ");
+ tprints(", ");
printflags(msg_flags, tcp->u_arg[2], "MSG_???");
}
return 0;
@@ -1745,7 +1745,7 @@
} else {
tprintf("%#lx, %ld, ", tcp->u_arg[1], tcp->u_arg[2]);
printflags(msg_flags, tcp->u_arg[3], "MSG_???");
- tprintf(", ");
+ tprints(", ");
print_timespec(tcp, tcp->u_arg[4]);
}
return 0;
@@ -1822,7 +1822,7 @@
int fds[2];
if (umoven(tcp, tcp->u_arg[0], sizeof fds, (char *) fds) < 0)
- tprintf("[...]");
+ tprints("[...]");
else
tprintf("[%u, %u]", fds[0], fds[1]);
#elif defined(SPARC) || defined(SPARC64) || defined(SH) || defined(SVR4) || defined(FREEBSD) || defined(IA64)
@@ -1832,7 +1832,7 @@
#endif
}
if (flags_arg >= 0) {
- tprintf(", ");
+ tprints(", ");
printflags(open_mode_flags, tcp->u_arg[flags_arg], "O_???");
}
}
@@ -1862,9 +1862,9 @@
if (entering(tcp)) {
printxval(domains, tcp->u_arg[0], "PF_???");
- tprintf(", ");
+ tprints(", ");
tprint_sock_type(tcp, tcp->u_arg[1]);
- tprintf(", ");
+ tprints(", ");
switch (tcp->u_arg[0]) {
case PF_INET:
printxval(protocols, tcp->u_arg[2], "IPPROTO_???");
@@ -1872,9 +1872,9 @@
#ifdef PF_IPX
case PF_IPX:
/* BTW: I don't believe this.. */
- tprintf("[");
+ tprints("[");
printxval(domains, tcp->u_arg[2], "PF_???");
- tprintf("]");
+ tprints("]");
break;
#endif /* PF_IPX */
default:
@@ -1888,7 +1888,7 @@
}
#ifdef LINUX
if (umoven(tcp, tcp->u_arg[3], sizeof fds, (char *) fds) < 0)
- tprintf(", [...]");
+ tprints(", [...]");
else
tprintf(", [%u, %u]", fds[0], fds[1]);
#endif /* LINUX */
@@ -1905,7 +1905,7 @@
if (entering(tcp)) {
tprintf("%ld, ", tcp->u_arg[0]);
printxval(socketlayers, tcp->u_arg[1], "SOL_???");
- tprintf(", ");
+ tprints(", ");
switch (tcp->u_arg[1]) {
case SOL_SOCKET:
printxval(sockoptions, tcp->u_arg[2], "SO_???");
@@ -1947,7 +1947,7 @@
tprintf("%lu", tcp->u_arg[2]);
break;
}
- tprintf(", ");
+ tprints(", ");
} else {
int len;
if (syserror(tcp) || umove(tcp, tcp->u_arg[4], &len) < 0) {
@@ -2036,7 +2036,7 @@
struct icmp_filter filter;
if (!addr) {
- tprintf("NULL");
+ tprints("NULL");
return;
}
if (syserror(tcp) || !verbose(tcp)) {
@@ -2044,13 +2044,13 @@
return;
}
if (umove(tcp, addr, &filter) < 0) {
- tprintf("{...}");
+ tprints("{...}");
return;
}
- tprintf("~(");
+ tprints("~(");
printflags(icmpfilterflags, ~filter.data, "ICMP_???");
- tprintf(")");
+ tprints(")");
}
#endif /* ICMP_FILTER */
@@ -2058,7 +2058,7 @@
printsockopt(struct tcb *tcp, int level, int name, long addr, int len)
{
printxval(socketlayers, level, "SOL_??");
- tprintf(", ");
+ tprints(", ");
switch (level) {
case SOL_SOCKET:
printxval(sockoptions, name, "SO_???");
@@ -2137,7 +2137,7 @@
switch (name) {
#if defined(ICMP_FILTER)
case ICMP_FILTER:
- tprintf(", ");
+ tprints(", ");
printicmpfilter(tcp, addr);
return 0;
#endif
@@ -2154,7 +2154,7 @@
/* default arg printing */
- tprintf(", ");
+ tprints(", ");
if (len == sizeof(int)) {
printnum_int(tcp, addr, "%d");
@@ -2177,12 +2177,12 @@
while (len >= (int) sizeof hdr) {
if (umove(tcp, addr, &hdr) < 0) break;
if (c++) {
- tprintf(", ");
+ tprints(", ");
}
else if (len > hdr.len + sizeof hdr) {
- tprintf("[");
+ tprints("[");
}
- tprintf("{");
+ tprints("{");
addr += sizeof hdr;
len -= sizeof hdr;
printsockopt(tcp, hdr.level, hdr.name, addr, hdr.len);
@@ -2190,13 +2190,13 @@
addr += hdr.len;
len -= hdr.len;
}
- tprintf("}");
+ tprints("}");
}
if (len > 0) {
- if (c++) tprintf(", ");
+ if (c++) tprints(", ");
printstr(tcp, addr, len);
}
- if (c > 1) tprintf("]");
+ if (c > 1) tprints("]");
}
#endif
@@ -2232,7 +2232,7 @@
if (entering(tcp)) {
int i;
printxval(sock_version, tcp->u_arg[0], "__NETLIB_???");
- tprintf(", ");
+ tprints(", ");
--tcp->u_nargs;
for (i = 0; i < tcp->u_nargs; i++)
tcp->u_arg[i] = tcp->u_arg[i + 1];
@@ -2295,12 +2295,12 @@
{
if (entering(tcp)) {
printxval(sock_version, tcp->u_arg[0], "__NETLIB_???");
- tprintf(", ");
+ tprints(", ");
if (tcp->u_arg[1] == 0) {
- tprintf("LOCALNAME, ");
+ tprints("LOCALNAME, ");
}
else if (tcp->u_arg[1] == 1) {
- tprintf("REMOTENAME, ");
+ tprints("REMOTENAME, ");
}
else {
tprintf("%ld, ", tcp->u_arg[1]);
@@ -2313,7 +2313,7 @@
} else {
printsock(tcp, tcp->u_arg[3], tcp->u_arg[4]);
}
- tprintf(", ");
+ tprints(", ");
printnum(tcp, tcp->u_arg[4], "%lu");
}
diff --git a/proc.c b/proc.c
index 1fe4890..55253e8 100644
--- a/proc.c
+++ b/proc.c
@@ -101,23 +101,23 @@
case PIOCSTOP:
case PIOCWSTOP:
if (arg == 0)
- tprintf(", NULL");
+ tprints(", NULL");
else if (syserror(tcp))
tprintf(", %#x", arg);
else if (umove(tcp, arg, &status) < 0)
- tprintf(", {...}");
+ tprints(", {...}");
else {
- tprintf(", {pr_flags=");
+ tprints(", {pr_flags=");
printflags(proc_status_flags, status.pr_flags, "PR_???");
if (status.pr_why) {
- tprintf(", pr_why=");
+ tprints(", pr_why=");
printxval(proc_status_why, status.pr_why,
"PR_???");
}
switch (status.pr_why) {
case PR_SIGNALLED:
case PR_JOBCONTROL:
- tprintf(", pr_what=");
+ tprints(", pr_what=");
printsignal(status.pr_what);
break;
case PR_FAULTED:
@@ -129,29 +129,29 @@
sysent[status.pr_what].sys_name);
break;
}
- tprintf(", ...}");
+ tprints(", ...}");
}
return 1;
case PIOCRUN:
if (arg == 0)
- tprintf(", NULL");
+ tprints(", NULL");
else if (umove(tcp, arg, &run) < 0)
- tprintf(", {...}");
+ tprints(", {...}");
else {
- tprintf(", {pr_flags=");
+ tprints(", {pr_flags=");
printflags(proc_run_flags, run.pr_flags, "PR???");
- tprintf(", ...}");
+ tprints(", ...}");
}
return 1;
#ifdef PIOCSET
case PIOCSET:
case PIOCRESET:
if (umove(tcp, arg, &val) < 0)
- tprintf(", [?]");
+ tprints(", [?]");
else {
- tprintf(", [");
+ tprints(", [");
printflags(proc_status_flags, val, "PR_???");
- tprintf("]");
+ tprints("]");
}
return 1;
#endif /* PIOCSET */
@@ -159,11 +159,11 @@
case PIOCUNKILL:
/* takes a pointer to a signal */
if (umove(tcp, arg, &val) < 0)
- tprintf(", [?]");
+ tprints(", [?]");
else {
- tprintf(", [");
+ tprints(", [");
printsignal(val);
- tprintf("]");
+ tprints("]");
}
return 1;
case PIOCSFORK:
@@ -213,39 +213,39 @@
case PIOCSTATUS:
case PIOCWAIT:
if (arg == 0)
- tprintf(", NULL");
+ tprints(", NULL");
else if (syserror(tcp))
tprintf(", %x", arg);
else if (umove(tcp, arg, &status) < 0)
- tprintf(", {...}");
+ tprints(", {...}");
else {
tprintf(", {state=%d, flags=", status.state);
printflags(proc_status_flags, status.flags, "PF_???");
- tprintf(", events=");
+ tprints(", events=");
printflags(proc_status_why, status.events, "S_???");
- tprintf(", why=");
+ tprints(", why=");
printxval(proc_status_why, status.why, "S_???");
tprintf(", val=%lu}", status.val);
}
return 1;
case PIOCBIS:
- tprintf(", ");
+ tprints(", ");
printflags(proc_status_why, arg, "S_???");
return 1;
return 1;
case PIOCSFL:
- tprintf(", ");
+ tprints(", ");
printflags(proc_status_flags, arg, "PF_???");
return 1;
case PIOCGFL:
if (syserror(tcp))
tprintf(", %#x", arg);
else if (umove(tcp, arg, &val) < 0)
- tprintf(", {...}");
+ tprints(", {...}");
else {
- tprintf(", [");
+ tprints(", [");
printflags(proc_status_flags, val, "PF_???");
- tprintf("]");
+ tprints("]");
}
return 1;
default:
diff --git a/process.c b/process.c
index 4ae74a4..c235a3d 100644
--- a/process.c
+++ b/process.c
@@ -430,7 +430,7 @@
/* special case: we stop tracing this process, finish line now */
tprintf("%ld) ", tcp->u_arg[0]);
tabto();
- tprintf("= ?");
+ tprints("= ?");
printtrailer();
return 0;
}
@@ -597,7 +597,7 @@
tprintf("stack_size=%#lx, ",
tcp->u_arg[ARG_STACKSIZE]);
# endif
- tprintf("flags=");
+ tprints("flags=");
if (!printflags(clone_flags, flags &~ CSIGNAL, NULL))
sep = "";
if ((flags & CSIGNAL) != 0)
@@ -614,7 +614,7 @@
tprintf(", {entry_number:%d, ",
copy.entry_number);
if (!verbose(tcp))
- tprintf("...}");
+ tprints("...}");
else
print_ldt_entry(©);
}
@@ -1072,12 +1072,12 @@
len = tcp->u_arg[0];
tprintf("%lu, ", len);
if (len == 0) {
- tprintf("[]");
+ tprints("[]");
return 0;
}
start = tcp->u_arg[1];
if (start == 0) {
- tprintf("NULL");
+ tprints("NULL");
return 0;
}
size = len * sizeof(gid);
@@ -1093,22 +1093,22 @@
} else {
abbrev_end = end;
}
- tprintf("[");
+ tprints("[");
for (cur = start; cur < end; cur += sizeof(gid)) {
if (cur > start)
- tprintf(", ");
+ tprints(", ");
if (cur >= abbrev_end) {
- tprintf("...");
+ tprints("...");
break;
}
if (umoven(tcp, cur, sizeof(gid), (char *) &gid) < 0) {
- tprintf("?");
+ tprints("?");
failed = 1;
break;
}
tprintf("%lu", (unsigned long) gid);
}
- tprintf("]");
+ tprints("]");
if (failed)
tprintf(" %#lx", tcp->u_arg[1]);
}
@@ -1130,12 +1130,12 @@
len = tcp->u_rval;
if (len == 0) {
- tprintf("[]");
+ tprints("[]");
return 0;
}
start = tcp->u_arg[1];
if (start == 0) {
- tprintf("NULL");
+ tprints("NULL");
return 0;
}
if (tcp->u_arg[0] == 0) {
@@ -1156,22 +1156,22 @@
} else {
abbrev_end = end;
}
- tprintf("[");
+ tprints("[");
for (cur = start; cur < end; cur += sizeof(gid)) {
if (cur > start)
- tprintf(", ");
+ tprints(", ");
if (cur >= abbrev_end) {
- tprintf("...");
+ tprints("...");
break;
}
if (umoven(tcp, cur, sizeof(gid), (char *) &gid) < 0) {
- tprintf("?");
+ tprints("?");
failed = 1;
break;
}
tprintf("%lu", (unsigned long) gid);
}
- tprintf("]");
+ tprints("]");
if (failed)
tprintf(" %#lx", tcp->u_arg[1]);
}
@@ -1190,12 +1190,12 @@
len = tcp->u_arg[0];
tprintf("%lu, ", len);
if (len == 0) {
- tprintf("[]");
+ tprints("[]");
return 0;
}
start = tcp->u_arg[1];
if (start == 0) {
- tprintf("NULL");
+ tprints("NULL");
return 0;
}
size = len * sizeof(gid);
@@ -1211,22 +1211,22 @@
} else {
abbrev_end = end;
}
- tprintf("[");
+ tprints("[");
for (cur = start; cur < end; cur += sizeof(gid)) {
if (cur > start)
- tprintf(", ");
+ tprints(", ");
if (cur >= abbrev_end) {
- tprintf("...");
+ tprints("...");
break;
}
if (umoven(tcp, cur, sizeof(gid), (char *) &gid) < 0) {
- tprintf("?");
+ tprints("?");
failed = 1;
break;
}
tprintf("%lu", (unsigned long) gid);
}
- tprintf("]");
+ tprints("]");
if (failed)
tprintf(" %#lx", tcp->u_arg[1]);
}
@@ -1248,12 +1248,12 @@
len = tcp->u_rval;
if (len == 0) {
- tprintf("[]");
+ tprints("[]");
return 0;
}
start = tcp->u_arg[1];
if (start == 0) {
- tprintf("NULL");
+ tprints("NULL");
return 0;
}
size = len * sizeof(gid);
@@ -1270,22 +1270,22 @@
} else {
abbrev_end = end;
}
- tprintf("[");
+ tprints("[");
for (cur = start; cur < end; cur += sizeof(gid)) {
if (cur > start)
- tprintf(", ");
+ tprints(", ");
if (cur >= abbrev_end) {
- tprintf("...");
+ tprints("...");
break;
}
if (umoven(tcp, cur, sizeof(gid), (char *) &gid) < 0) {
- tprintf("?");
+ tprints("?");
failed = 1;
break;
}
tprintf("%lu", (unsigned long) gid);
}
- tprintf("]");
+ tprints("]");
if (failed)
tprintf(" %#lx", tcp->u_arg[1]);
}
@@ -1424,12 +1424,12 @@
return;
}
- tprintf("[");
+ tprints("[");
for (i = 0; i < len; ++i) {
const char *t, *p;
- if (i) tprintf(", ");
+ if (i) tprints(", ");
if ((t = xlookup(procpriv_type, buf[i] & PS_TYPE)) &&
(p = xlookup(procpriv_priv, buf[i] & ~PS_TYPE)))
@@ -1441,9 +1441,9 @@
}
}
- if (dots) tprintf(" ...");
+ if (dots) tprints(" ...");
- tprintf("]");
+ tprints("]");
}
@@ -1461,7 +1461,7 @@
break;
default:
- tprintf(", ");
+ tprints(", ");
printpriv(tcp, tcp->u_arg[1], tcp->u_arg[2]);
tprintf(", %ld", tcp->u_arg[2]);
}
@@ -1471,7 +1471,7 @@
tprintf(", %#lx, %ld", tcp->u_arg[1], tcp->u_arg[2]);
}
else {
- tprintf(", ");
+ tprints(", ");
printpriv(tcp, tcp->u_arg[1], tcp->u_rval);
tprintf(", %ld", tcp->u_arg[2]);
}
@@ -1534,9 +1534,9 @@
if (!verbose(tcp))
tprintf(", %#lx", tcp->u_arg[1]);
else {
- tprintf(", [");
+ tprints(", [");
printargv(tcp, tcp->u_arg[1]);
- tprintf("]");
+ tprints("]");
}
}
return 0;
@@ -1551,18 +1551,18 @@
if (!verbose(tcp))
tprintf(", %#lx", tcp->u_arg[1]);
else {
- tprintf(", [");
+ tprints(", [");
printargv(tcp, tcp->u_arg[1]);
- tprintf("]");
+ tprints("]");
}
if (!verbose(tcp))
tprintf(", %#lx", tcp->u_arg[2]);
else if (abbrev(tcp))
printargc(", [/* %d var%s */]", tcp, tcp->u_arg[2]);
else {
- tprintf(", [");
+ tprints(", [");
printargv(tcp, tcp->u_arg[2]);
- tprintf("]");
+ tprints("]");
}
}
return 0;
@@ -1697,7 +1697,7 @@
}
if (status == 0)
- tprintf("]");
+ tprints("]");
else
tprintf(" | %#x]", status);
@@ -1734,24 +1734,24 @@
} else {
/* status */
if (!tcp->u_arg[1])
- tprintf("NULL");
+ tprints("NULL");
else if (syserror(tcp) || tcp->u_rval == 0)
tprintf("%#lx", tcp->u_arg[1]);
else if (umove(tcp, tcp->u_arg[1], &status) < 0)
- tprintf("[?]");
+ tprints("[?]");
else
#ifdef SUNOS4
exited =
#endif
printstatus(status);
/* options */
- tprintf(", ");
+ tprints(", ");
printflags(wait4_options, tcp->u_arg[2], "W???");
if (n == 4) {
- tprintf(", ");
+ tprints(", ");
/* usage */
if (!tcp->u_arg[3])
- tprintf("NULL");
+ tprints("NULL");
#ifdef LINUX
else if (tcp->u_rval > 0) {
#ifdef ALPHA
@@ -1865,21 +1865,21 @@
else {
/* siginfo */
if (!tcp->u_arg[2])
- tprintf("NULL");
+ tprints("NULL");
else if (syserror(tcp))
tprintf("%#lx", tcp->u_arg[2]);
else if (umove(tcp, tcp->u_arg[2], &si) < 0)
- tprintf("{???}");
+ tprints("{???}");
else
printsiginfo(&si, verbose(tcp));
/* options */
- tprintf(", ");
+ tprints(", ");
printflags(wait4_options, tcp->u_arg[3], "W???");
if (tcp->u_nargs > 4) {
/* usage */
- tprintf(", ");
+ tprints(", ");
if (!tcp->u_arg[4])
- tprintf("NULL");
+ tprints("NULL");
else if (tcp->u_error)
tprintf("%#lx", tcp->u_arg[4]);
else
@@ -1908,7 +1908,7 @@
if (syserror(tcp) || !verbose(tcp))
tprintf("%#lx", tcp->u_arg[0]);
else if (umove(tcp, tcp->u_arg[0], &uname) < 0)
- tprintf("{...}");
+ tprints("{...}");
else if (!abbrev(tcp)) {
tprintf("{sysname=\"%s\", nodename=\"%s\", ",
@@ -1921,7 +1921,7 @@
tprintf(", domainname=\"%s\"", uname.domainname);
#endif
#endif
- tprintf("}");
+ tprints("}");
}
else
tprintf("{sys=\"%s\", node=\"%s\", ...}",
@@ -3061,11 +3061,11 @@
case PTRACE_SETSIGINFO: {
siginfo_t si;
if (!tcp->u_arg[3])
- tprintf("NULL");
+ tprints("NULL");
else if (syserror(tcp))
tprintf("%#lx", tcp->u_arg[3]);
else if (umove(tcp, tcp->u_arg[3], &si) < 0)
- tprintf("{???}");
+ tprints("{???}");
else
printsiginfo(&si, verbose(tcp));
break;
@@ -3095,11 +3095,11 @@
case PTRACE_GETSIGINFO: {
siginfo_t si;
if (!tcp->u_arg[3])
- tprintf("NULL");
+ tprints("NULL");
else if (syserror(tcp))
tprintf("%#lx", tcp->u_arg[3]);
else if (umove(tcp, tcp->u_arg[3], &si) < 0)
- tprintf("{???}");
+ tprints("{???}");
else
printsiginfo(&si, verbose(tcp));
break;
@@ -3239,10 +3239,10 @@
if (cmd == FUTEX_WAKE_BITSET)
tprintf(", %lx", tcp->u_arg[5]);
else if (cmd == FUTEX_WAIT) {
- tprintf(", ");
+ tprints(", ");
printtv(tcp, tcp->u_arg[3]);
} else if (cmd == FUTEX_WAIT_BITSET) {
- tprintf(", ");
+ tprints(", ");
printtv(tcp, tcp->u_arg[3]);
tprintf(", %lx", tcp->u_arg[5]);
} else if (cmd == FUTEX_REQUEUE)
@@ -3252,15 +3252,15 @@
else if (cmd == FUTEX_WAKE_OP) {
tprintf(", %ld, %p, {", tcp->u_arg[3], (void *) tcp->u_arg[4]);
if ((tcp->u_arg[5] >> 28) & 8)
- tprintf("FUTEX_OP_OPARG_SHIFT|");
+ tprints("FUTEX_OP_OPARG_SHIFT|");
printxval(futexwakeops, (tcp->u_arg[5] >> 28) & 0x7, "FUTEX_OP_???");
tprintf(", %ld, ", (tcp->u_arg[5] >> 12) & 0xfff);
if ((tcp->u_arg[5] >> 24) & 8)
- tprintf("FUTEX_OP_OPARG_SHIFT|");
+ tprints("FUTEX_OP_OPARG_SHIFT|");
printxval(futexwakecmps, (tcp->u_arg[5] >> 24) & 0x7, "FUTEX_OP_CMP_???");
tprintf(", %ld}", tcp->u_arg[5] & 0xfff);
} else if (cmd == FUTEX_WAIT_REQUEUE_PI) {
- tprintf(", ");
+ tprints(", ");
printtv(tcp, tcp->u_arg[3]);
tprintf(", %p", (void *) tcp->u_arg[4]);
}
@@ -3283,9 +3283,9 @@
if (umove(tcp, list, &w) < 0)
break;
if (first)
- tprintf("{");
+ tprints("{");
else
- tprintf(", ");
+ tprints(", ");
first = 0;
tprintf("%lx", w);
}
@@ -3296,7 +3296,7 @@
tprintf(", %s}", (len >= sizeof(w) && len > min_len ?
"???" : "..."));
} else {
- tprintf(first ? "{}" : "}");
+ tprints(first ? "{}" : "}");
}
}
@@ -3439,13 +3439,13 @@
if (exiting(tcp)) {
unsigned u;
if (tcp->u_arg[0] == 0)
- tprintf("NULL, ");
+ tprints("NULL, ");
else if (umove(tcp, tcp->u_arg[0], &u) < 0)
tprintf("%#lx, ", tcp->u_arg[0]);
else
tprintf("[%u], ", u);
if (tcp->u_arg[1] == 0)
- tprintf("NULL, ");
+ tprints("NULL, ");
else if (umove(tcp, tcp->u_arg[1], &u) < 0)
tprintf("%#lx, ", tcp->u_arg[1]);
else
diff --git a/quota.c b/quota.c
index 25db698..b0b7257 100644
--- a/quota.c
+++ b/quota.c
@@ -353,12 +353,12 @@
if (!abbrev(tcp)) {
tprintf("btime=%" PRIu64 ", ", dq.dqb_btime);
tprintf("itime=%" PRIu64 ", ", dq.dqb_itime);
- tprintf("valid=");
+ tprints("valid=");
printflags(if_dqblk_valid,
dq.dqb_valid, "QIF_???");
- tprintf("}");
+ tprints("}");
} else
- tprintf("...}");
+ tprints("...}");
break;
}
case Q_V1_GETQUOTA:
@@ -421,7 +421,7 @@
break;
}
tprintf("{version=%d, ", dq.d_version);
- tprintf("flags=");
+ tprints("flags=");
printflags(xfs_dqblk_flags,
dq.d_flags, "XFS_???_QUOTA");
tprintf(", fieldmask=%#x, ", dq.d_fieldmask);
@@ -441,7 +441,7 @@
tprintf("rtbtimer=%d, ", dq.d_rtbtimer);
tprintf("rtbwarns=%u}", dq.d_rtbwarns);
} else
- tprintf("...}");
+ tprints("...}");
break;
}
case Q_GETFMT:
@@ -456,9 +456,9 @@
tprintf("{???} %#lx", data);
break;
}
- tprintf("{");
+ tprints("{");
printxval(quota_formats, fmt, "QFMT_VFS_???");
- tprintf("}");
+ tprints("}");
break;
}
case Q_GETINFO:
@@ -477,9 +477,9 @@
tprintf("{bgrace=%" PRIu64 ", ", dq.dqi_bgrace);
tprintf("igrace=%" PRIu64 ", ", dq.dqi_igrace);
tprintf("flags=%#x, ", dq.dqi_flags);
- tprintf("valid=");
+ tprints("valid=");
printflags(if_dqinfo_valid, dq.dqi_valid, "IIF_???");
- tprintf("}");
+ tprints("}");
break;
}
case Q_V2_GETINFO:
@@ -562,10 +562,10 @@
}
tprintf("{version=%d, ", dq.qs_version);
if (abbrev(tcp)) {
- tprintf("...}");
+ tprints("...}");
break;
}
- tprintf("flags=");
+ tprints("flags=");
printflags(xfs_quota_flags,
dq.qs_flags, "XFS_QUOTA_???");
tprintf(", incoredqs=%u, ", dq.qs_incoredqs);
@@ -590,9 +590,9 @@
tprintf("{???} %#lx", data);
break;
}
- tprintf("{");
+ tprints("{");
printflags(xfs_quota_flags, flag, "XFS_QUOTA_???");
- tprintf("}");
+ tprints("}");
break;
}
default:
@@ -620,11 +620,11 @@
if (entering(tcp)) {
printxval(quotacmds, cmd, "Q_???");
- tprintf("|");
+ tprints("|");
printxval(quotatypes, type, "???QUOTA");
- tprintf(", ");
+ tprints(", ");
printstr(tcp, tcp->u_arg[1], -1);
- tprintf(", ");
+ tprints(", ");
switch (cmd) {
case Q_V1_QUOTAON:
case Q_QUOTAON:
@@ -647,10 +647,10 @@
tprintf("%#lx", tcp->u_arg[2]);
break;
}
- tprintf(", ");
+ tprints(", ");
} else {
if (!tcp->u_arg[3])
- tprintf("NULL");
+ tprints("NULL");
else
decode_cmd_data(tcp, cmd, tcp->u_arg[3]);
}
@@ -691,12 +691,12 @@
if (entering(tcp)) {
#ifdef SUNOS4
printxval(quotacmds, tcp->u_arg[0], "Q_???");
- tprintf(", ");
+ tprints(", ");
printstr(tcp, tcp->u_arg[1], -1);
#endif
#ifdef FREEBSD
printpath(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
printxval(quotacmds, tcp->u_arg[1], "Q_???");
#endif
tprintf(", %lu, %#lx", tcp->u_arg[2], tcp->u_arg[3]);
diff --git a/resource.c b/resource.c
index b9550b8..9a90ad8 100644
--- a/resource.c
+++ b/resource.c
@@ -132,7 +132,7 @@
} rlim;
if (umove(tcp, tcp->u_arg[1], &rlim) < 0)
- tprintf("{...}");
+ tprints("{...}");
else {
tprintf("{rlim_cur=%s,",
sprintrlim(rlim.rlim_cur == -1 ? RLIM_INFINITY
@@ -151,7 +151,7 @@
if (entering(tcp)) {
printxval(resources, tcp->u_arg[0], "RLIMIT_???");
- tprintf(", ");
+ tprints(", ");
}
else {
if (syserror(tcp) || !verbose(tcp))
@@ -161,7 +161,7 @@
print_rlimit32(tcp);
# endif
else if (umove(tcp, tcp->u_arg[1], &rlim) < 0)
- tprintf("{...}");
+ tprints("{...}");
else {
tprintf("{rlim_cur=%s,", sprintrlim(rlim.rlim_cur));
tprintf(" rlim_max=%s}", sprintrlim(rlim.rlim_max));
@@ -177,7 +177,7 @@
if (entering(tcp)) {
printxval(resources, tcp->u_arg[0], "RLIMIT_???");
- tprintf(", ");
+ tprints(", ");
if (!verbose(tcp))
tprintf("%#lx", tcp->u_arg[1]);
# if defined LINUX && (defined POWERPC64 || defined X86_64)
@@ -185,7 +185,7 @@
print_rlimit32(tcp);
# endif
else if (umove(tcp, tcp->u_arg[1], &rlim) < 0)
- tprintf("{...}");
+ tprints("{...}");
else {
tprintf("{rlim_cur=%s,", sprintrlim(rlim.rlim_cur));
tprintf(" rlim_max=%s}", sprintrlim(rlim.rlim_max));
@@ -217,13 +217,13 @@
if (entering(tcp)) {
printxval(resources, tcp->u_arg[0], "RLIMIT_???");
- tprintf(", ");
+ tprints(", ");
}
else {
if (syserror(tcp) || !verbose(tcp))
tprintf("%#lx", tcp->u_arg[1]);
else if (umove(tcp, tcp->u_arg[1], &rlim) < 0)
- tprintf("{...}");
+ tprints("{...}");
else {
tprintf("{rlim_cur=%s,", sprintrlim64(rlim.rlim_cur));
tprintf(" rlim_max=%s}", sprintrlim64(rlim.rlim_max));
@@ -239,11 +239,11 @@
if (entering(tcp)) {
printxval(resources, tcp->u_arg[0], "RLIMIT_???");
- tprintf(", ");
+ tprints(", ");
if (!verbose(tcp))
tprintf("%#lx", tcp->u_arg[1]);
else if (umove(tcp, tcp->u_arg[1], &rlim) < 0)
- tprintf("{...}");
+ tprints("{...}");
else {
tprintf("{rlim_cur=%s,", sprintrlim64(rlim.rlim_cur));
tprintf(" rlim_max=%s}", sprintrlim64(rlim.rlim_max));
@@ -292,11 +292,11 @@
} ru;
if (!addr)
- tprintf("NULL");
+ tprints("NULL");
else if (syserror(tcp) || !verbose(tcp))
tprintf("%#lx", addr);
else if (umove(tcp, addr, &ru) < 0)
- tprintf("{...}");
+ tprints("{...}");
else if (!abbrev(tcp)) {
tprintf("{ru_utime={%lu, %lu}, ru_stime={%lu, %lu}, ",
(long) ru.ru_utime.tv_sec, (long) ru.ru_utime.tv_usec,
@@ -328,11 +328,11 @@
struct rusage ru;
if (!addr)
- tprintf("NULL");
+ tprints("NULL");
else if (syserror(tcp) || !verbose(tcp))
tprintf("%#lx", addr);
else if (umove(tcp, addr, &ru) < 0)
- tprintf("{...}");
+ tprints("{...}");
else if (!abbrev(tcp)) {
tprintf("{ru_utime={%lu, %lu}, ru_stime={%lu, %lu}, ",
(long) ru.ru_utime.tv_sec, (long) ru.ru_utime.tv_usec,
@@ -362,7 +362,7 @@
{
if (entering(tcp)) {
printxval(usagewho, tcp->u_arg[0], "RUSAGE_???");
- tprintf(", ");
+ tprints(", ");
}
else
printrusage(tcp, tcp->u_arg[1]);
@@ -375,7 +375,7 @@
{
if (entering(tcp)) {
printxval(usagewho, tcp->u_arg[0], "RUSAGE_???");
- tprintf(", ");
+ tprints(", ");
}
else
printrusage32(tcp, tcp->u_arg[1]);
@@ -396,7 +396,7 @@
if (syserror(tcp) || !verbose(tcp))
tprintf("%#lx", tcp->u_arg[0]);
else if (umove(tcp, tcp->u_arg[0], &si) < 0)
- tprintf("{...}");
+ tprints("{...}");
else {
tprintf("{uptime=%lu, loads=[%lu, %lu, %lu] ",
si.uptime, si.loads[0], si.loads[1],
@@ -458,11 +458,11 @@
if (exiting(tcp)) {
if (tcp->u_arg[0] == 0)
- tprintf("NULL");
+ tprints("NULL");
else if (syserror(tcp))
tprintf("%#lx", tcp->u_arg[0]);
else if (umove(tcp, tcp->u_arg[0], &tbuf) < 0)
- tprintf("{...}");
+ tprints("{...}");
else {
tprintf("{tms_utime=%lu, tms_stime=%lu, ",
tbuf.tms_utime, tbuf.tms_stime);
diff --git a/scsi.c b/scsi.c
index cc077a9..b8b2866 100644
--- a/scsi.c
+++ b/scsi.c
@@ -33,7 +33,7 @@
tprintf(", %02x", buf[i]);
free(buf);
if (allocated != len)
- tprintf(", ...");
+ tprints(", ...");
}
static void
@@ -55,7 +55,7 @@
tprintf(", data[%u]=[", sg_io->dxfer_len);
printstr(tcp, (unsigned long) sg_io->dxferp,
sg_io->dxfer_len);
- tprintf("]");
+ tprints("]");
}
}
@@ -67,7 +67,7 @@
tprintf(", data[%u]=[", sg_io->dxfer_len);
printstr(tcp, (unsigned long) sg_io->dxferp,
sg_io->dxfer_len);
- tprintf("]");
+ tprints("]");
}
tprintf(", status=%02x, ", sg_io->status);
tprintf("masked_status=%02x, ", sg_io->masked_status);
@@ -91,7 +91,7 @@
if (umove(tcp, arg, &sg_io) < 0)
tprintf(", %#lx", arg);
else {
- tprintf(", ");
+ tprints(", ");
print_sg_io_req(tcp, &sg_io);
}
}
@@ -101,7 +101,7 @@
if (!syserror(tcp) && umove(tcp, arg, &sg_io) >= 0)
print_sg_io_res(tcp, &sg_io);
else
- tprintf("}");
+ tprints("}");
}
break;
default:
diff --git a/signal.c b/signal.c
index 84af14f..1e36973 100644
--- a/signal.c
+++ b/signal.c
@@ -400,7 +400,7 @@
sigset_t ss;
if (!addr)
- tprintf("NULL");
+ tprints("NULL");
else if (copy_sigset(tcp, addr, &ss) < 0)
tprintf("%#lx", addr);
else
@@ -667,10 +667,10 @@
const char *code;
if (sip->si_signo == 0) {
- tprintf("{}");
+ tprints("{}");
return;
}
- tprintf("{si_signo=");
+ tprints("{si_signo=");
printsignal(sip->si_signo);
code = xlookup(siginfo_codes, sip->si_code);
if (!code) {
@@ -745,7 +745,7 @@
if (!sip->si_ptr)
break;
if (!verbose)
- tprintf(", ...");
+ tprints(", ...");
else
tprintf(", si_value={int=%u, ptr=%#lx}",
sip->si_int,
@@ -767,7 +767,7 @@
printsignal(sip->si_status);
#if LINUX
if (!verbose)
- tprintf(", ...");
+ tprints(", ...");
else
tprintf(", si_utime=%lu, si_stime=%lu",
sip->si_utime,
@@ -796,7 +796,7 @@
if (!sip->si_ptr)
break;
if (!verbose)
- tprintf(", ...");
+ tprints(", ...");
else {
tprintf(", si_value={int=%u, ptr=%#lx}",
sip->si_int,
@@ -807,7 +807,7 @@
}
}
}
- tprintf("}");
+ tprints("}");
}
#endif /* SVR4 || LINUX */
@@ -822,38 +822,38 @@
if (entering(tcp)) {
printsignal(tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
addr = tcp->u_arg[1];
} else {
addr = tcp->u_arg[2];
}
if (addr == 0)
- tprintf("NULL");
+ tprints("NULL");
else if (!verbose(tcp))
tprintf("%#lx", addr);
else if (umove(tcp, addr, &sv) < 0)
- tprintf("{...}");
+ tprints("{...}");
else {
switch ((int) sv.sv_handler) {
case (int) SIG_ERR:
- tprintf("{SIG_ERR}");
+ tprints("{SIG_ERR}");
break;
case (int) SIG_DFL:
- tprintf("{SIG_DFL}");
+ tprints("{SIG_DFL}");
break;
case (int) SIG_IGN:
if (tcp->u_arg[0] == SIGTRAP) {
tcp->flags |= TCB_SIGTRAPPED;
kill(tcp->pid, SIGSTOP);
}
- tprintf("{SIG_IGN}");
+ tprints("{SIG_IGN}");
break;
case (int) SIG_HOLD:
if (tcp->u_arg[0] == SIGTRAP) {
tcp->flags |= TCB_SIGTRAPPED;
kill(tcp->pid, SIGSTOP);
}
- tprintf("SIG_HOLD");
+ tprints("SIG_HOLD");
break;
default:
if (tcp->u_arg[0] == SIGTRAP) {
@@ -862,13 +862,13 @@
}
tprintf("{%#lx, ", (unsigned long) sv.sv_handler);
printsigmask(&sv.sv_mask, 0);
- tprintf(", ");
+ tprints(", ");
printflags(sigvec_flags, sv.sv_flags, "SV_???");
- tprintf("}");
+ tprints("}");
}
}
if (entering(tcp))
- tprintf(", ");
+ tprints(", ");
return 0;
}
@@ -894,7 +894,7 @@
else
addr = tcp->u_arg[1];
if (addr == 0)
- tprintf("NULL");
+ tprints("NULL");
else if (umove(tcp, addr, &ss) < 0)
tprintf("%#lx", addr);
else {
@@ -902,7 +902,7 @@
tprintf("ss_onstack %s}", ss.ss_onstack ? "YES" : "NO");
}
if (entering(tcp))
- tprintf(", ");
+ tprints(", ");
return 0;
}
@@ -982,16 +982,16 @@
if (entering(tcp)) {
printsignal(tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
addr = tcp->u_arg[1];
} else
addr = tcp->u_arg[2];
if (addr == 0)
- tprintf("NULL");
+ tprints("NULL");
else if (!verbose(tcp))
tprintf("%#lx", addr);
else if (umove(tcp, addr, &sa) < 0)
- tprintf("{...}");
+ tprints("{...}");
else {
/* Architectures using function pointers, like
* hppa, may need to manipulate the function pointer
@@ -1002,9 +1002,9 @@
* compiler from generating code to manipulate
* SA_HANDLER we cast the function pointers to long. */
if ((long)sa.SA_HANDLER == (long)SIG_ERR)
- tprintf("{SIG_ERR, ");
+ tprints("{SIG_ERR, ");
else if ((long)sa.SA_HANDLER == (long)SIG_DFL)
- tprintf("{SIG_DFL, ");
+ tprints("{SIG_DFL, ");
else if ((long)sa.SA_HANDLER == (long)SIG_IGN) {
#ifndef USE_PROCFS
if (tcp->u_arg[0] == SIGTRAP) {
@@ -1012,7 +1012,7 @@
kill(tcp->pid, SIGSTOP);
}
#endif /* !USE_PROCFS */
- tprintf("{SIG_IGN, ");
+ tprints("{SIG_IGN, ");
}
else {
#ifndef USE_PROCFS
@@ -1028,17 +1028,17 @@
long_to_sigset(sa.sa_mask, &sigset);
printsigmask(&sigset, 0);
#endif
- tprintf(", ");
+ tprints(", ");
printflags(sigact_flags, sa.sa_flags, "SA_???");
#ifdef SA_RESTORER
if (sa.sa_flags & SA_RESTORER)
tprintf(", %p", sa.sa_restorer);
#endif
- tprintf("}");
+ tprints("}");
}
}
if (entering(tcp))
- tprintf(", ");
+ tprints(", ");
#ifdef LINUX
else
tprintf(", %#lx", (unsigned long) sa.sa_restorer);
@@ -1051,13 +1051,13 @@
{
if (entering(tcp)) {
printsignal(tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
switch (tcp->u_arg[1]) {
case (long) SIG_ERR:
- tprintf("SIG_ERR");
+ tprints("SIG_ERR");
break;
case (long) SIG_DFL:
- tprintf("SIG_DFL");
+ tprints("SIG_DFL");
break;
case (long) SIG_IGN:
#ifndef USE_PROCFS
@@ -1066,7 +1066,7 @@
kill(tcp->pid, SIGSTOP);
}
#endif /* !USE_PROCFS */
- tprintf("SIG_IGN");
+ tprints("SIG_IGN");
break;
default:
#ifndef USE_PROCFS
@@ -1464,7 +1464,7 @@
if (entering(tcp)) {
if (umove(tcp, tcp->u_arg[0], &sigset) < 0)
- tprintf("[?]");
+ tprints("[?]");
else
printsigmask(&sigset, 0);
}
@@ -1514,22 +1514,22 @@
static void
printcontext(struct tcb *tcp, ucontext_t *ucp)
{
- tprintf("{");
+ tprints("{");
if (!abbrev(tcp)) {
- tprintf("uc_flags=");
+ tprints("uc_flags=");
printflags(ucontext_flags, ucp->uc_flags, "UC_???");
tprintf(", uc_link=%#lx, ", (unsigned long) ucp->uc_link);
}
- tprintf("uc_sigmask=");
+ tprints("uc_sigmask=");
printsigmask(&ucp->uc_sigmask, 0);
if (!abbrev(tcp)) {
tprintf(", uc_stack={ss_sp=%#lx, ss_size=%d, ss_flags=",
(unsigned long) ucp->uc_stack.ss_sp,
ucp->uc_stack.ss_size);
printflags(sigaltstack_flags, ucp->uc_stack.ss_flags, "SS_???");
- tprintf("}");
+ tprints("}");
}
- tprintf(", ...}");
+ tprints(", ...}");
}
int
@@ -1541,9 +1541,9 @@
if (tcp->u_error)
tprintf("%#lx", tcp->u_arg[0]);
else if (!tcp->u_arg[0])
- tprintf("NULL");
+ tprints("NULL");
else if (umove(tcp, tcp->u_arg[0], &uc) < 0)
- tprintf("{...}");
+ tprints("{...}");
else
printcontext(tcp, &uc);
}
@@ -1557,9 +1557,9 @@
if (entering(tcp)) {
if (!tcp->u_arg[0])
- tprintf("NULL");
+ tprints("NULL");
else if (umove(tcp, tcp->u_arg[0], &uc) < 0)
- tprintf("{...}");
+ tprints("{...}");
else
printcontext(tcp, &uc);
}
@@ -1593,14 +1593,14 @@
{
if (entering(tcp)) {
if (tcp->u_arg[0] == 0)
- tprintf("NULL");
+ tprints("NULL");
else if (print_stack_t(tcp, tcp->u_arg[0]) < 0)
return -1;
}
else {
- tprintf(", ");
+ tprints(", ");
if (tcp->u_arg[1] == 0)
- tprintf("NULL");
+ tprints("NULL");
else if (print_stack_t(tcp, tcp->u_arg[1]) < 0)
return -1;
}
@@ -1616,7 +1616,7 @@
#ifdef ALPHA
if (entering(tcp)) {
printxval(sigprocmaskcmds, tcp->u_arg[0], "SIG_???");
- tprintf(", ");
+ tprints(", ");
printsigmask(tcp->u_arg[1], 0);
}
else if (!syserror(tcp)) {
@@ -1627,17 +1627,17 @@
if (entering(tcp)) {
#ifdef SVR4
if (tcp->u_arg[0] == 0)
- tprintf("0");
+ tprints("0");
else
#endif /* SVR4 */
printxval(sigprocmaskcmds, tcp->u_arg[0], "SIG_???");
- tprintf(", ");
+ tprints(", ");
print_sigset(tcp, tcp->u_arg[1], 0);
- tprintf(", ");
+ tprints(", ");
}
else {
if (!tcp->u_arg[2])
- tprintf("NULL");
+ tprints("NULL");
else if (syserror(tcp))
tprintf("%#lx", tcp->u_arg[2]);
else
@@ -1693,7 +1693,7 @@
if (syserror(tcp))
tprintf("%#lx", tcp->u_arg[0]);
else if (copy_sigset(tcp, tcp->u_arg[0], &sigset) < 0)
- tprintf("[?]");
+ tprints("[?]");
else
printsigmask(&sigset, 0);
}
@@ -1707,7 +1707,7 @@
if (entering(tcp)) {
if (copy_sigset(tcp, tcp->u_arg[0], &sigset) < 0)
- tprintf("[?]");
+ tprints("[?]");
else
printsigmask(&sigset, 0);
}
@@ -1731,23 +1731,23 @@
/* Note: arg[3] is the length of the sigset. */
if (entering(tcp)) {
printxval(sigprocmaskcmds, tcp->u_arg[0], "SIG_???");
- tprintf(", ");
+ tprints(", ");
if (!tcp->u_arg[1])
- tprintf("NULL, ");
+ tprints("NULL, ");
else if (copy_sigset_len(tcp, tcp->u_arg[1], &sigset, tcp->u_arg[3]) < 0)
tprintf("%#lx, ", tcp->u_arg[1]);
else {
printsigmask(&sigset, 1);
- tprintf(", ");
+ tprints(", ");
}
}
else {
if (!tcp->u_arg[2])
- tprintf("NULL");
+ tprints("NULL");
else if (syserror(tcp))
tprintf("%#lx", tcp->u_arg[2]);
else if (copy_sigset_len(tcp, tcp->u_arg[2], &sigset, tcp->u_arg[3]) < 0)
- tprintf("[?]");
+ tprints("[?]");
else
printsigmask(&sigset, 1);
tprintf(", %lu", tcp->u_arg[3]);
@@ -1785,13 +1785,13 @@
if (entering(tcp)) {
printsignal(tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
addr = tcp->u_arg[1];
} else
addr = tcp->u_arg[2];
if (addr == 0) {
- tprintf("NULL");
+ tprints("NULL");
goto after_sa;
}
if (!verbose(tcp)) {
@@ -1825,7 +1825,7 @@
r = umove(tcp, addr, &sa);
}
if (r < 0) {
- tprintf("{...}");
+ tprints("{...}");
goto after_sa;
}
/* Architectures using function pointers, like
@@ -1837,11 +1837,11 @@
* compiler from generating code to manipulate
* SA_HANDLER we cast the function pointers to long. */
if ((long)sa.__sa_handler == (long)SIG_ERR)
- tprintf("{SIG_ERR, ");
+ tprints("{SIG_ERR, ");
else if ((long)sa.__sa_handler == (long)SIG_DFL)
- tprintf("{SIG_DFL, ");
+ tprints("{SIG_DFL, ");
else if ((long)sa.__sa_handler == (long)SIG_IGN)
- tprintf("{SIG_IGN, ");
+ tprints("{SIG_IGN, ");
else
tprintf("{%#lx, ", (long) sa.__sa_handler);
/* Questionable code below.
@@ -1860,17 +1860,17 @@
else
memcpy(&sigset, &sa.sa_mask, sizeof(sigset));
printsigmask(&sigset, 1);
- tprintf(", ");
+ tprints(", ");
printflags(sigact_flags, sa.sa_flags, "SA_???");
#ifdef SA_RESTORER
if (sa.sa_flags & SA_RESTORER)
tprintf(", %p", sa.sa_restorer);
#endif
- tprintf("}");
+ tprints("}");
after_sa:
if (entering(tcp))
- tprintf(", ");
+ tprints(", ");
else
#ifdef LINUXSPARC
tprintf(", %#lx, %lu", tcp->u_arg[3], tcp->u_arg[4]);
@@ -1892,7 +1892,7 @@
tprintf("%#lx", tcp->u_arg[0]);
else if (copy_sigset_len(tcp, tcp->u_arg[0],
&sigset, tcp->u_arg[1]) < 0)
- tprintf("[?]");
+ tprints("[?]");
else
printsigmask(&sigset, 1);
}
@@ -1905,7 +1905,7 @@
if (entering(tcp)) {
sigset_t sigm;
if (copy_sigset_len(tcp, tcp->u_arg[0], &sigm, tcp->u_arg[1]) < 0)
- tprintf("[?]");
+ tprints("[?]");
else
printsigmask(&sigm, 1);
}
@@ -1919,7 +1919,7 @@
siginfo_t si;
tprintf("%lu, ", tcp->u_arg[0]);
printsignal(tcp->u_arg[1]);
- tprintf(", ");
+ tprints(", ");
if (umove(tcp, tcp->u_arg[2], &si) < 0)
tprintf("%#lx", tcp->u_arg[2]);
else
@@ -1935,15 +1935,15 @@
if (copy_sigset_len(tcp, tcp->u_arg[0],
&sigset, tcp->u_arg[3]) < 0)
- tprintf("[?]");
+ tprints("[?]");
else
printsigmask(&sigset, 1);
- tprintf(", ");
+ tprints(", ");
/* This is the only "return" parameter, */
if (tcp->u_arg[1] != 0)
return 0;
/* ... if it's NULL, can decode all on entry */
- tprintf("NULL, ");
+ tprints("NULL, ");
}
else if (tcp->u_arg[1] != 0) {
/* syscall exit, and u_arg[1] wasn't NULL */
@@ -1955,7 +1955,7 @@
tprintf("%#lx, ", tcp->u_arg[1]);
else {
printsiginfo(&si, verbose(tcp));
- tprintf(", ");
+ tprints(", ");
}
}
}
@@ -1972,7 +1972,7 @@
sys_restart_syscall(struct tcb *tcp)
{
if (entering(tcp))
- tprintf("<... resuming interrupted call ...>");
+ tprints("<... resuming interrupted call ...>");
return 0;
}
@@ -1981,11 +1981,11 @@
{
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
print_sigset(tcp, tcp->u_arg[1], 1);
tprintf(", %lu", tcp->u_arg[2]);
if (flags_arg >= 0) {
- tprintf(", ");
+ tprints(", ");
printflags(open_mode_flags, tcp->u_arg[flags_arg], "O_???");
}
}
diff --git a/sock.c b/sock.c
index bbbdd5b..f48fd46 100644
--- a/sock.c
+++ b/sock.c
@@ -92,7 +92,7 @@
&& ifc.ifc_buf == NULL)
tprintf(", {%d -> ", ifc.ifc_len);
else
- tprintf(", {");
+ tprints(", {");
}
return 0;
}
@@ -188,12 +188,12 @@
printxval(addrfams,
ifr.ifr_addr.sa_family,
"AF_???");
- tprintf(", ");
+ tprints(", ");
print_addr(tcp, ((long) tcp->u_arg[2]
+ offsetof(struct ifreq,
ifr_addr.sa_data)),
&ifr);
- tprintf("}");
+ tprints("}");
break;
case SIOCGIFHWADDR:
case SIOCSIFHWADDR:
@@ -206,7 +206,7 @@
break;
case SIOCGIFFLAGS:
case SIOCSIFFLAGS:
- tprintf("ifr_flags=");
+ tprints("ifr_flags=");
printflags(iffflags, ifr.ifr_flags, "IFF_???");
break;
case SIOCGIFMETRIC:
@@ -238,19 +238,19 @@
(unsigned) ifr.ifr_map.port);
break;
}
- tprintf("}");
+ tprints("}");
}
return 1;
case SIOCGIFCONF:
if (umove(tcp, tcp->u_arg[2], &ifc) < 0) {
- tprintf("???}");
+ tprints("???}");
return 1;
}
tprintf("%d, ", ifc.ifc_len);
if (syserror(tcp)) {
tprintf("%lx", (unsigned long) ifc.ifc_buf);
} else if (ifc.ifc_buf == NULL) {
- tprintf("NULL");
+ tprints("NULL");
} else {
int i;
unsigned nifra = ifc.ifc_len / sizeof(struct ifreq);
@@ -261,17 +261,17 @@
tprintf("%lx}", (unsigned long) ifc.ifc_buf);
return 1;
}
- tprintf("{");
+ tprints("{");
for (i = 0; i < nifra; ++i ) {
if (i > 0)
- tprintf(", ");
+ tprints(", ");
tprintf("{\"%s\", {",
ifra[i].ifr_name);
if (verbose(tcp)) {
printxval(addrfams,
ifra[i].ifr_addr.sa_family,
"AF_???");
- tprintf(", ");
+ tprints(", ");
print_addr(tcp, ((long) tcp->u_arg[2]
+ offsetof(struct ifreq,
ifr_addr.sa_data)
@@ -279,12 +279,12 @@
- (char *) &ifra[0])),
&ifra[i]);
} else
- tprintf("...");
- tprintf("}}");
+ tprints("...");
+ tprints("}}");
}
- tprintf("}");
+ tprints("}");
}
- tprintf("}");
+ tprints("}");
return 1;
#endif
default:
diff --git a/strace.c b/strace.c
index 9c63388..bdc2112 100644
--- a/strace.c
+++ b/strace.c
@@ -1797,7 +1797,7 @@
"cleanup: looking at pid %u\n", tcp->pid);
if (tcp_last &&
(!outfname || followfork < 2 || tcp_last == tcp)) {
- tprintf(" <unfinished ...>");
+ tprints(" <unfinished ...>");
printtrailer();
}
if (tcp->flags & TCB_ATTACHED)
@@ -2249,7 +2249,7 @@
#ifdef PR_INFO
if (tcp->status.PR_INFO.si_signo == what) {
printleader(tcp);
- tprintf(" siginfo=");
+ tprints(" siginfo=");
printsiginfo(&tcp->status.PR_INFO, 1);
printtrailer();
}
@@ -2565,7 +2565,7 @@
#endif
printleader(tcp);
if (ptrace(PTRACE_GETSIGINFO, pid, 0, &si) == 0) {
- tprintf("--- ");
+ tprints("--- ");
printsiginfo(&si, verbose(tcp));
tprintf(" (%s)" PC_FORMAT_STR " ---",
strsignal(WSTOPSIG(status))
@@ -2606,7 +2606,7 @@
* Finish the line then.
*/
tcp_last->flags |= TCB_REPRINT;
- tprintf(" <unfinished ...>");
+ tprints(" <unfinished ...>");
printtrailer();
}
detach(tcp, 0);
@@ -2669,14 +2669,14 @@
if (tcp_last) {
if (tcp_last->ptrace_errno) {
if (tcp_last->flags & TCB_INSYSCALL) {
- tprintf(" <unavailable>) ");
+ tprints(" <unavailable>) ");
tabto();
}
- tprintf("= ? <unavailable>\n");
+ tprints("= ? <unavailable>\n");
tcp_last->ptrace_errno = 0;
} else if (!outfname || followfork < 2 || tcp_last == tcp) {
tcp_last->flags |= TCB_REPRINT;
- tprintf(" <unfinished ...>\n");
+ tprints(" <unfinished ...>\n");
}
}
curcol = 0;
@@ -2725,7 +2725,7 @@
void
printtrailer(void)
{
- tprintf("\n");
+ tprints("\n");
tcp_last = NULL;
}
diff --git a/stream.c b/stream.c
index 165e116..56f07c6 100644
--- a/stream.c
+++ b/stream.c
@@ -80,14 +80,14 @@
printstrbuf(struct tcb *tcp, struct strbuf *sbp, int getting)
{
if (sbp->maxlen == -1 && getting)
- tprintf("{maxlen=-1}");
+ tprints("{maxlen=-1}");
else {
- tprintf("{");
+ tprints("{");
if (getting)
tprintf("maxlen=%d, ", sbp->maxlen);
tprintf("len=%d, buf=", sbp->len);
printstr(tcp, (unsigned long) sbp->buf, sbp->len);
- tprintf("}");
+ tprints("}");
}
}
@@ -97,12 +97,12 @@
struct strbuf buf;
if (arg == 0)
- tprintf("NULL");
+ tprints("NULL");
else if (umove(tcp, arg, &buf) < 0)
- tprintf("{...}");
+ tprints("{...}");
else
printstrbuf(tcp, &buf, getting);
- tprintf(", ");
+ tprints(", ");
}
int
@@ -142,13 +142,13 @@
printstrbufarg(tcp, tcp->u_arg[i], 1);
/* pointer to flags */
if (tcp->u_arg[3] == 0)
- tprintf("NULL");
+ tprints("NULL");
else if (umove(tcp, tcp->u_arg[3], &flags) < 0)
- tprintf("[?]");
+ tprints("[?]");
else {
- tprintf("[");
+ tprints("[");
printflags(msgflags, flags, "RS_???");
- tprintf("]");
+ tprints("]");
}
/* decode return value */
switch (tcp->u_rval) {
@@ -226,16 +226,16 @@
printstrbufarg(tcp, tcp->u_arg[i], 1);
/* pointer to band */
printnum(tcp, tcp->u_arg[3], "%d");
- tprintf(", ");
+ tprints(", ");
/* pointer to flags */
if (tcp->u_arg[4] == 0)
- tprintf("NULL");
+ tprints("NULL");
else if (umove(tcp, tcp->u_arg[4], &flags) < 0)
- tprintf("[?]");
+ tprints("[?]");
else {
- tprintf("[");
+ tprints("[");
printflags(pmsgflags, flags, "MSG_???");
- tprintf("]");
+ tprints("]");
}
/* decode return value */
switch (tcp->u_rval) {
@@ -311,16 +311,16 @@
} else {
abbrev_end = end;
}
- tprintf("[");
+ tprints("[");
for (cur = start; cur < end; cur += sizeof(fds)) {
if (cur > start)
- tprintf(", ");
+ tprints(", ");
if (cur >= abbrev_end) {
- tprintf("...");
+ tprints("...");
break;
}
if (umoven(tcp, cur, sizeof fds, (char *) &fds) < 0) {
- tprintf("?");
+ tprints("?");
failed = 1;
break;
}
@@ -328,13 +328,13 @@
tprintf("{fd=%d}", fds.fd);
continue;
}
- tprintf("{fd=");
+ tprints("{fd=");
printfd(tcp, fds.fd);
- tprintf(", events=");
+ tprints(", events=");
printflags(pollflags, fds.events, "POLL???");
- tprintf("}");
+ tprints("}");
}
- tprintf("]");
+ tprints("]");
if (failed)
tprintf(" %#lx", start);
tprintf(", %d, ", nfds);
@@ -426,7 +426,7 @@
if (entering(tcp)) {
#ifdef INFTIM
if (tcp->u_arg[2] == INFTIM)
- tprintf("INFTIM");
+ tprints("INFTIM");
else
#endif
tprintf("%ld", tcp->u_arg[2]);
@@ -441,7 +441,7 @@
int rc = decode_poll(tcp, tcp->u_arg[2]);
if (entering(tcp)) {
print_timespec(tcp, tcp->u_arg[2]);
- tprintf(", ");
+ tprints(", ");
print_sigset(tcp, tcp->u_arg[3], 0);
tprintf(", %lu", tcp->u_arg[4]);
}
@@ -599,14 +599,14 @@
while (len >= (int) sizeof hdr) {
if (umove(tcp, addr, &hdr) < 0) break;
if (c++) {
- tprintf(", ");
+ tprints(", ");
}
else if (len > hdr.len + sizeof hdr) {
- tprintf("[");
+ tprints("[");
}
- tprintf("{level=");
+ tprints("{level=");
printxval(xti_level, hdr.level, "???");
- tprintf(", name=");
+ tprints(", name=");
switch (hdr.level) {
case XTI_GENERIC:
printxval(xti_generic, hdr.name, "XTI_???");
@@ -615,13 +615,13 @@
tprintf("%ld", hdr.name);
break;
}
- tprintf(", status=");
+ tprints(", status=");
printxval(transport_user_flags, hdr.status, "T_???");
addr += sizeof hdr;
len -= sizeof hdr;
if ((hdr.len -= sizeof hdr) > 0) {
if (hdr.len > len) break;
- tprintf(", val=");
+ tprints(", val=");
if (len == sizeof(int))
printnum(tcp, addr, "%d");
else
@@ -629,13 +629,13 @@
addr += hdr.len;
len -= hdr.len;
}
- tprintf("}");
+ tprints("}");
}
if (len > 0) {
- if (c++) tprintf(", ");
+ if (c++) tprints(", ");
printstr(tcp, addr, len);
}
- if (c > 1) tprintf("]");
+ if (c > 1) tprints("]");
}
#endif
@@ -742,17 +742,17 @@
#define GET(type, struct) \
do { \
if (len < sizeof m.struct) goto dump; \
- if (umove(tcp, addr, &m.struct) < 0) goto dump;\
- tprintf("{"); \
+ if (umove(tcp, addr, &m.struct) < 0) goto dump; \
+ tprints("{"); \
if (expect != type) { \
++c; \
- tprintf(#type); \
+ tprints(#type); \
} \
} \
while (0)
#define COMMA() \
- do { if (c++) tprintf(", "); } while (0)
+ do { if (c++) tprints(", "); } while (0)
#define STRUCT(struct, elem, print) \
@@ -767,7 +767,7 @@
m.struct.elem##_offset); \
} \
else { \
- tprintf(#elem "="); \
+ tprints(#elem "="); \
print(tcp, \
addr + m.struct.elem##_offset, \
m.struct.elem##_length); \
@@ -853,7 +853,7 @@
case T_OPTMGMT_REQ: /* manage opt req */
GET(T_OPTMGMT_REQ, optmgmt_req);
COMMA();
- tprintf("MGMT=");
+ tprints("MGMT=");
printflags(transport_user_flags, m.optmgmt_req.MGMT_flags,
"T_???");
STRUCT(optmgmt_req, OPT, print_optmgmt);
@@ -912,9 +912,9 @@
m.info_ack.ADDR_size, m.info_ack.OPT_size,
m.info_ack.TIDU_size);
printxval(service_type, m.info_ack.SERV_type, "T_???");
- tprintf(", CURRENT=");
+ tprints(", CURRENT=");
printxval(ts_state, m.info_ack.CURRENT_state, "TS_???");
- tprintf(", PROVIDER=");
+ tprints(", PROVIDER=");
printflags(provider_flags, m.info_ack.PROVIDER_flag, "???");
break;
#endif
@@ -929,10 +929,10 @@
case T_ERROR_ACK: /* error ack */
GET(T_ERROR_ACK, error_ack);
COMMA();
- tprintf("ERROR=");
+ tprints("ERROR=");
printxval(transport_user_options,
m.error_ack.ERROR_prim, "TI_???");
- tprintf(", TLI=");
+ tprints(", TLI=");
printxval(tli_errors, m.error_ack.TLI_error, "T???");
tprintf("UNIX=%s", strerror(m.error_ack.UNIX_error));
break;
@@ -941,7 +941,7 @@
case T_OK_ACK: /* ok ack */
GET(T_OK_ACK, ok_ack);
COMMA();
- tprintf("CORRECT=");
+ tprints("CORRECT=");
printxval(transport_user_options,
m.ok_ack.CORRECT_prim, "TI_???");
break;
@@ -965,7 +965,7 @@
case T_OPTMGMT_ACK: /* manage opt ack */
GET(T_OPTMGMT_ACK, optmgmt_ack);
COMMA();
- tprintf("MGMT=");
+ tprints("MGMT=");
printflags(transport_user_flags, m.optmgmt_ack.MGMT_flags,
"T_???");
STRUCT(optmgmt_ack, OPT, print_optmgmt);
@@ -995,7 +995,7 @@
break;
}
- if (c >= 0) tprintf("}");
+ if (c >= 0) tprints("}");
#undef ADDR
#undef COMMA
@@ -1022,7 +1022,7 @@
return 0;
if (umove(tcp, arg, &si) < 0) {
if (entering(tcp))
- tprintf(", {...}");
+ tprints(", {...}");
return 1;
}
if (entering(tcp)) {
@@ -1034,7 +1034,7 @@
} else
tprintf(", {ic_cmd=%#x", si.ic_cmd);
if (si.ic_timout == INFTIM)
- tprintf(", ic_timout=INFTIM, ");
+ tprints(", ic_timout=INFTIM, ");
else
tprintf(" ic_timout=%d, ", si.ic_timout);
}
@@ -1048,9 +1048,9 @@
}
if (in_and_out) {
if (entering(tcp))
- tprintf("/* in */ ");
+ tprints("/* in */ ");
else
- tprintf(", /* out */ ");
+ tprints(", /* out */ ");
}
if (in_and_out || entering(tcp))
tprintf("ic_len=%d, ic_dp=", si.ic_len);
@@ -1124,7 +1124,7 @@
if (entering(tcp))
break;
if (umove(tcp, (int) si.ic_dp, &udata) < 0)
- tprintf("{...}");
+ tprints("{...}");
else {
tprintf("{tidusize=%d, addrsize=%d, ",
udata.tidusize, udata.addrsize);
@@ -1133,7 +1133,7 @@
tprintf("servtype=%d, so_state=%d, ",
udata.servtype, udata.so_state);
tprintf("so_options=%d", udata.so_options);
- tprintf("}");
+ tprints("}");
}
break;
#endif /* SI_GETUDATA */
@@ -1142,7 +1142,7 @@
break;
}
if (exiting(tcp)) {
- tprintf("}");
+ tprints("}");
if (timod && tcp->u_rval && !syserror(tcp)) {
tcp->auxstr = xlookup(tli_errors, tcp->u_rval);
return RVAL_STR + 1;
@@ -1180,7 +1180,7 @@
case I_LOOK:
case I_FIND:
/* arg is a string */
- tprintf(", ");
+ tprints(", ");
printpath(tcp, arg);
return 1;
case I_POP:
@@ -1188,56 +1188,56 @@
return 1;
case I_FLUSH:
/* argument is an option */
- tprintf(", ");
+ tprints(", ");
printxval(stream_flush_options, arg, "FLUSH???");
return 1;
#ifdef I_FLUSHBAND
case I_FLUSHBAND:
/* argument is a pointer to a bandinfo struct */
if (umove(tcp, arg, &bi) < 0)
- tprintf(", {...}");
+ tprints(", {...}");
else {
tprintf(", {bi_pri=%d, bi_flag=", bi.bi_pri);
printflags(stream_flush_options, bi.bi_flag, "FLUSH???");
- tprintf("}");
+ tprints("}");
}
return 1;
#endif /* I_FLUSHBAND */
case I_SETSIG:
/* argument is a set of flags */
- tprintf(", ");
+ tprints(", ");
printflags(stream_setsig_flags, arg, "S_???");
return 1;
case I_GETSIG:
/* argument is a pointer to a set of flags */
if (syserror(tcp))
return 0;
- tprintf(", [");
+ tprints(", [");
if (umove(tcp, arg, &val) < 0)
- tprintf("?");
+ tprints("?");
else
printflags(stream_setsig_flags, val, "S_???");
- tprintf("]");
+ tprints("]");
return 1;
case I_PEEK:
/* argument is a pointer to a strpeek structure */
if (syserror(tcp) || !arg)
return 0;
if (umove(tcp, arg, &sp) < 0) {
- tprintf(", {...}");
+ tprints(", {...}");
return 1;
}
- tprintf(", {ctlbuf=");
+ tprints(", {ctlbuf=");
printstrbuf(tcp, &sp.ctlbuf, 1);
- tprintf(", databuf=");
+ tprints(", databuf=");
printstrbuf(tcp, &sp.databuf, 1);
- tprintf(", flags=");
+ tprints(", flags=");
printflags(msgflags, sp.flags, "RS_???");
- tprintf("}");
+ tprints("}");
return 1;
case I_SRDOPT:
/* argument is an option with flags */
- tprintf(", ");
+ tprints(", ");
printxval(stream_read_options, arg & RMODEMASK, "R???");
addflags(stream_read_flags, arg & ~RMODEMASK);
return 1;
@@ -1245,15 +1245,15 @@
/* argument is an pointer to an option with flags */
if (syserror(tcp))
return 0;
- tprintf(", [");
+ tprints(", [");
if (umove(tcp, arg, &val) < 0)
- tprintf("?");
+ tprints("?");
else {
printxval(stream_read_options,
arg & RMODEMASK, "R???");
addflags(stream_read_flags, arg & ~RMODEMASK);
}
- tprintf("]");
+ tprints("]");
return 1;
case I_NREAD:
#ifdef I_GETBAND
@@ -1268,7 +1268,7 @@
/* argument is a pointer to a decimal integer */
if (syserror(tcp))
return 0;
- tprintf(", ");
+ tprints(", ");
printnum(tcp, arg, "%d");
return 1;
case I_FDINSERT:
@@ -1276,21 +1276,21 @@
if (syserror(tcp) || !arg)
return 0;
if (umove(tcp, arg, &sfi) < 0) {
- tprintf(", {...}");
+ tprints(", {...}");
return 1;
}
- tprintf(", {ctlbuf=");
+ tprints(", {ctlbuf=");
printstrbuf(tcp, &sfi.ctlbuf, 1);
- tprintf(", databuf=");
+ tprints(", databuf=");
printstrbuf(tcp, &sfi.databuf, 1);
- tprintf(", flags=");
+ tprints(", flags=");
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(", ");
+ tprints(", ");
printflags(stream_write_flags, arg, "SND???");
return 1;
#endif /* I_SWROPT */
@@ -1299,12 +1299,12 @@
/* argument is an pointer to an option with flags */
if (syserror(tcp))
return 0;
- tprintf(", [");
+ tprints(", [");
if (umove(tcp, arg, &val) < 0)
- tprintf("?");
+ tprints("?");
else
printflags(stream_write_flags, arg, "SND???");
- tprintf("]");
+ tprints("]");
return 1;
#endif /* I_GWROPT */
case I_SENDFD:
@@ -1326,7 +1326,7 @@
if (syserror(tcp) || !arg)
return 0;
if (umove(tcp, arg, &srf) < 0) {
- tprintf(", {...}");
+ tprints(", {...}");
return 1;
}
tprintf(", {fd=%d, uid=%lu, gid=%lu}", srf.fd,
@@ -1337,25 +1337,25 @@
if (syserror(tcp))
return 0;
if (arg == 0) {
- tprintf(", NULL");
+ tprints(", NULL");
return 1;
}
if (umove(tcp, arg, &sl) < 0) {
- tprintf(", {...}");
+ tprints(", {...}");
return 1;
}
tprintf(", {sl_nmods=%d, sl_modlist=[", sl.sl_nmods);
for (i = 0; i < tcp->u_rval; i++) {
if (i)
- tprintf(", ");
+ tprints(", ");
printpath(tcp, (int) sl.sl_modlist[i].l_name);
}
- tprintf("]}");
+ tprints("]}");
return 1;
#endif /* I_LIST */
#ifdef I_ATMARK
case I_ATMARK:
- tprintf(", ");
+ tprints(", ");
printxval(stream_atmark_options, arg, "???MARK");
return 1;
#endif /* I_ATMARK */
diff --git a/syscall.c b/syscall.c
index 02dce95..77df174 100644
--- a/syscall.c
+++ b/syscall.c
@@ -2360,9 +2360,9 @@
}
if (res != 1) {
- tprintf(") ");
+ tprints(") ");
tabto();
- tprintf("= ? <unavailable>");
+ tprints("= ? <unavailable>");
printtrailer();
tcp->flags &= ~TCB_INSYSCALL;
return res;
@@ -2385,7 +2385,7 @@
sys_res = (*sysent[tcp->scno].sys_func)(tcp);
}
- tprintf(") ");
+ tprints(") ");
tabto();
u_error = tcp->u_error;
if (!SCNO_IN_RANGE(tcp->scno) ||
@@ -2399,16 +2399,16 @@
switch (u_error) {
#ifdef LINUX
case ERESTARTSYS:
- tprintf("= ? ERESTARTSYS (To be restarted)");
+ tprints("= ? ERESTARTSYS (To be restarted)");
break;
case ERESTARTNOINTR:
- tprintf("= ? ERESTARTNOINTR (To be restarted)");
+ tprints("= ? ERESTARTNOINTR (To be restarted)");
break;
case ERESTARTNOHAND:
- tprintf("= ? ERESTARTNOHAND (To be restarted)");
+ tprints("= ? ERESTARTNOHAND (To be restarted)");
break;
case ERESTART_RESTARTBLOCK:
- tprintf("= ? ERESTART_RESTARTBLOCK (To be restarted)");
+ tprints("= ? ERESTART_RESTARTBLOCK (To be restarted)");
break;
#endif /* LINUX */
default:
@@ -2427,7 +2427,7 @@
}
else {
if (sys_res & RVAL_NONE)
- tprintf("= ?");
+ tprints("= ?");
else {
switch (sys_res & RVAL_MASK) {
case RVAL_HEX:
diff --git a/system.c b/system.c
index 63101c3..8b7d6b3 100644
--- a/system.c
+++ b/system.c
@@ -136,19 +136,19 @@
ignore_type = ignore_data = 1;
printpath(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
printpath(tcp, tcp->u_arg[1]);
- tprintf(", ");
+ tprints(", ");
if (ignore_type && tcp->u_arg[2])
tprintf("%#lx", tcp->u_arg[2]);
else
printstr(tcp, tcp->u_arg[2], -1);
- tprintf(", ");
+ tprints(", ");
printflags(mount_flags, tcp->u_arg[3], "MS_???");
- tprintf(", ");
+ tprints(", ");
if (ignore_data && tcp->u_arg[4])
tprintf("%#lx", tcp->u_arg[4]);
@@ -174,7 +174,7 @@
{
if (entering(tcp)) {
printstr(tcp, tcp->u_arg[0], -1);
- tprintf(", ");
+ tprints(", ");
printflags(umount_flags, tcp->u_arg[1], "MNT_???");
}
return 0;
@@ -243,12 +243,12 @@
{
if (entering(tcp)) {
printflags(bootflags1, tcp->u_arg[0], "LINUX_REBOOT_MAGIC_???");
- tprintf(", ");
+ tprints(", ");
printflags(bootflags2, tcp->u_arg[1], "LINUX_REBOOT_MAGIC_???");
- tprintf(", ");
+ tprints(", ");
printflags(bootflags3, tcp->u_arg[2], "LINUX_REBOOT_CMD_???");
if (tcp->u_arg[2] == LINUX_REBOOT_CMD_RESTART2) {
- tprintf(", ");
+ tprints(", ");
printstr(tcp, tcp->u_arg[3], -1);
}
}
@@ -290,7 +290,7 @@
tprintf("%#lx, ", tcp->u_arg[0]);
/* scope */
printxval(cacheflush_scope, tcp->u_arg[1], "FLUSH_SCOPE_???");
- tprintf(", ");
+ tprints(", ");
/* flags */
printflags(cacheflush_flags, tcp->u_arg[2], "FLUSH_CACHE_???");
/* len */
@@ -516,9 +516,9 @@
tprintf("\"%s\", ", type);
}
printstr(tcp, tcp->u_arg[1], -1);
- tprintf(", ");
+ tprints(", ");
printflags(mountflags, tcp->u_arg[2] & ~M_NEWTYPE, "M_???");
- tprintf(", ");
+ tprints(", ");
if (strcmp(type, "4.2") == 0) {
struct ufs_args a;
@@ -534,9 +534,9 @@
struct nfs_args a;
if (umove(tcp, tcp->u_arg[3], &a) < 0)
return 0;
- tprintf("[");
+ tprints("[");
printsock(tcp, (int) a.addr);
- tprintf(", ");
+ tprints(", ");
printflags(nfsflags, a.flags, "NFSMNT_???");
tprintf(", ws:%u,rs:%u,to:%u,re:%u,",
a.wsize, a.rsize, a.timeo, a.retrans);
@@ -550,13 +550,13 @@
printstr(tcp, (int) a.netname, -1);
else
tprintf("%#lx", (unsigned long) a.netname);
- tprintf("]");
+ tprints("]");
} else if (strcmp(type, "rfs") == 0) {
struct rfs_args a;
struct token t;
if (umove(tcp, tcp->u_arg[3], &a) < 0)
return 0;
- tprintf("[");
+ tprints("[");
printstr(tcp, (int)a.rmtfs, -1);
if (umove(tcp, (int)a.token, &t) < 0)
return 0;
@@ -613,27 +613,27 @@
}
tprintf("{fl:%u, anon:%u, ", e.ex_flags, e.ex_anon);
printxval(ex_auth_flags, e.ex_auth, "AUTH_???");
- tprintf(", roots:[");
+ tprints(", roots:[");
if (e.ex_auth == AUTH_UNIX) {
for (i = 0; i < e.ex_u.exunix.rootaddrs.naddrs; i++) {
printsock(tcp,
(int)&e.ex_u.exunix.rootaddrs.addrvec[i]);
}
- tprintf("], writers:[");
+ tprints("], writers:[");
for (i = 0; i < e.ex_writeaddrs.naddrs; i++) {
printsock(tcp,
(int)&e.ex_writeaddrs.addrvec[i]);
}
- tprintf("]");
+ tprints("]");
} else {
for (i = 0; i < e.ex_u.exdes.nnames; i++) {
printsock(tcp,
(int)&e.ex_u.exdes.rootnames[i]);
- tprintf(", ");
+ tprints(", ");
}
tprintf("], window:%u", e.ex_u.exdes.window);
}
- tprintf("}");
+ tprints("}");
}
return 0;
}
@@ -715,7 +715,7 @@
{
if (entering(tcp)) {
printstr(tcp, tcp->u_arg[0], -1);
- tprintf(", ");
+ tprints(", ");
printxval(pathconflimits, tcp->u_arg[1], "_PC_???");
}
return 0;
@@ -860,7 +860,7 @@
{
if (entering(tcp)) {
printxval(sysinfo_options, tcp->u_arg[0], "SI_???");
- tprintf(", ");
+ tprints(", ");
}
else {
/* Technically some calls write values. So what. */
@@ -1316,30 +1316,30 @@
{
if (entering(tcp)) {
printpath(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
printpath(tcp, tcp->u_arg[1]);
- tprintf(", ");
+ tprints(", ");
printflags(mount_flags, tcp->u_arg[2], "MS_???");
if (tcp->u_arg[2] & (MS_FSS | MS_DATA)) {
- tprintf(", ");
+ tprints(", ");
tprintf("%ld", tcp->u_arg[3]);
}
if (tcp->u_arg[2] & MS_DATA) {
int nfs_type = sysfs(GETFSIND, FSID_NFS);
- tprintf(", ");
+ tprints(", ");
if (tcp->u_arg[3] == nfs_type) {
struct nfs_args args;
if (umove(tcp, tcp->u_arg[4], &args) < 0)
tprintf("%#lx", tcp->u_arg[4]);
else {
- tprintf("addr=");
+ tprints("addr=");
printsock(tcp, (int) args.addr);
- tprintf(", flags=");
+ tprints(", flags=");
printflags(nfs_flags, args.flags, "NFSMNT_???");
- tprintf(", hostname=");
+ tprints(", hostname=");
printstr(tcp, (int) args.hostname, -1);
- tprintf(", ...}");
+ tprints(", ...}");
}
}
else
@@ -1427,9 +1427,9 @@
if (entering(tcp)) {
char fstyp[FSTYPSZ];
printpath(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
printpath(tcp, tcp->u_arg[1]);
- tprintf(", ");
+ tprints(", ");
printflags(mount_flags, tcp->u_arg[2], "MS_???");
/* The doc sez that the file system type is given as a
fsindex, and we should use sysfs to work out the name.
@@ -1444,7 +1444,7 @@
tprintf(", \"%s\"", fstyp);
}
if (tcp->u_arg[2] & MS_DATA) {
- tprintf(", ");
+ tprints(", ");
#ifdef VX_MS_MASK
/* On UW7 they don't give us the defines and structs
we need to see what is going on. Bummer. */
@@ -1453,23 +1453,23 @@
if (umove(tcp, tcp->u_arg[4], &args) < 0)
tprintf("%#lx", tcp->u_arg[4]);
else {
- tprintf("{ flags=");
+ tprints("{ flags=");
printflags(vxfs_flags, args.mflags, "VX_MS_???");
if (args.mflags & VX_MS_SNAPSHOT) {
- tprintf(", snapof=");
+ tprints(", snapof=");
printstr(tcp,
(long) args.primaryspec,
-1);
if (args.snapsize > 0)
tprintf(", snapsize=%ld", args.snapsize);
}
- tprintf(" }");
+ tprints(" }");
}
}
else
#endif
if (strcmp(fstyp, "specfs") == 0) {
- tprintf("dev=");
+ tprints("dev=");
printstr(tcp, tcp->u_arg[4], -1);
}
else
@@ -1479,18 +1479,18 @@
tprintf("%#lx", tcp->u_arg[4]);
else {
struct netbuf addr;
- tprintf("{ addr=");
+ tprints("{ addr=");
if (umove(tcp, (int) args.addr, &addr) < 0) {
tprintf("%#lx", (long) args.addr);
}
else {
printsock(tcp, (int) addr.buf, addr.len);
}
- tprintf(", flags=");
+ tprints(", flags=");
printflags(nfs_flags, args.flags, "NFSMNT_???");
- tprintf(", hostname=");
+ tprints(", hostname=");
printstr(tcp, (int) args.hostname, -1);
- tprintf(", ...}");
+ tprints(", ...}");
}
}
else
@@ -1508,9 +1508,9 @@
{
if (entering(tcp)) {
printpath(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
printpath(tcp, tcp->u_arg[1]);
- tprintf(", ...");
+ tprints(", ...");
}
return 0;
}
@@ -1584,29 +1584,29 @@
if (!entering(tcp)) {
if (!tcp->u_arg[0])
- tprintf("NULL");
+ tprints("NULL");
else if (!verbose(tcp))
tprintf("%#lx", tcp->u_arg[0]);
else if (umoven(tcp, tcp->u_arg[0], sizeof(*arg0), (char *) arg0) < 0)
- tprintf("???");
+ tprints("???");
else {
tprintf("%#x, %d", arg0->version, arg0->pid);
}
- tprintf(", ");
+ tprints(", ");
if (!tcp->u_arg[1])
- tprintf("NULL");
+ tprints("NULL");
else if (!verbose(tcp))
tprintf("%#lx", tcp->u_arg[1]);
else if (umoven(tcp, tcp->u_arg[1], sizeof(*arg1), (char *) arg1) < 0)
- tprintf("???");
+ tprints("???");
else {
- tprintf("{");
+ tprints("{");
printflags(capabilities, arg1->effective, "CAP_???");
- tprintf(", ");
+ tprints(", ");
printflags(capabilities, arg1->permitted, "CAP_???");
- tprintf(", ");
+ tprints(", ");
printflags(capabilities, arg1->inheritable, "CAP_???");
- tprintf("}");
+ tprints("}");
}
}
return 0;
@@ -1624,29 +1624,29 @@
if (entering(tcp)) {
if (!tcp->u_arg[0])
- tprintf("NULL");
+ tprints("NULL");
else if (!verbose(tcp))
tprintf("%#lx", tcp->u_arg[0]);
else if (umoven(tcp, tcp->u_arg[0], sizeof(*arg0), (char *) arg0) < 0)
- tprintf("???");
+ tprints("???");
else {
tprintf("%#x, %d", arg0->version, arg0->pid);
}
- tprintf(", ");
+ tprints(", ");
if (!tcp->u_arg[1])
- tprintf("NULL");
+ tprints("NULL");
else if (!verbose(tcp))
tprintf("%#lx", tcp->u_arg[1]);
else if (umoven(tcp, tcp->u_arg[1], sizeof(*arg1), (char *) arg1) < 0)
- tprintf("???");
+ tprints("???");
else {
- tprintf("{");
+ tprints("{");
printflags(capabilities, arg1->effective, "CAP_???");
- tprintf(", ");
+ tprints(", ");
printflags(capabilities, arg1->permitted, "CAP_???");
- tprintf(", ");
+ tprints(", ");
printflags(capabilities, arg1->inheritable, "CAP_???");
- tprintf("}");
+ tprints("}");
}
}
return 0;
@@ -1937,7 +1937,7 @@
if (entering(tcp)) {
int cnt = 0, max_cnt;
- tprintf("{{");
+ tprints("{{");
if (info.nlen == 0)
goto out;
@@ -1948,17 +1948,17 @@
goto out;
switch (name[0]) {
case CTL_KERN:
- tprintf(", ");
+ tprints(", ");
printxval(sysctl_kern, name[1], "KERN_???");
++cnt;
break;
case CTL_VM:
- tprintf(", ");
+ tprints(", ");
printxval(sysctl_vm, name[1], "VM_???");
++cnt;
break;
case CTL_NET:
- tprintf(", ");
+ tprints(", ");
printxval(sysctl_net, name[1], "NET_???");
++cnt;
@@ -1966,17 +1966,17 @@
goto out;
switch (name[1]) {
case NET_CORE:
- tprintf(", ");
+ tprints(", ");
printxval(sysctl_net_core, name[2],
"NET_CORE_???");
break;
case NET_UNIX:
- tprintf(", ");
+ tprints(", ");
printxval(sysctl_net_unix, name[2],
"NET_UNIX_???");
break;
case NET_IPV4:
- tprintf(", ");
+ tprints(", ");
printxval(sysctl_net_ipv4, name[2],
"NET_IPV4_???");
@@ -1984,13 +1984,13 @@
goto out;
switch (name[2]) {
case NET_IPV4_ROUTE:
- tprintf(", ");
+ tprints(", ");
printxval(sysctl_net_ipv4_route,
name[3],
"NET_IPV4_ROUTE_???");
break;
case NET_IPV4_CONF:
- tprintf(", ");
+ tprints(", ");
printxval(sysctl_net_ipv4_conf,
name[3],
"NET_IPV4_CONF_???");
@@ -2000,7 +2000,7 @@
}
break;
case NET_IPV6:
- tprintf(", ");
+ tprints(", ");
printxval(sysctl_net_ipv6, name[2],
"NET_IPV6_???");
@@ -2008,7 +2008,7 @@
goto out;
switch (name[2]) {
case NET_IPV6_ROUTE:
- tprintf(", ");
+ tprints(", ");
printxval(sysctl_net_ipv6_route,
name[3],
"NET_IPV6_ROUTE_???");
@@ -2031,7 +2031,7 @@
while (cnt < max_cnt)
tprintf(", %x", name[cnt++]);
if (cnt < info.nlen)
- tprintf(", ...");
+ tprints(", ...");
tprintf("}, %d, ", info.nlen);
} else {
size_t oldlen;
@@ -2050,7 +2050,7 @@
printpath(tcp, (size_t)info.oldval);
tprintf(", %Zu, ", oldlen);
if (info.newval == 0)
- tprintf("NULL");
+ tprints("NULL");
else if (syserror(tcp))
tprintf("%p", info.newval);
else
@@ -2060,7 +2060,7 @@
tprintf("%p, %Zd, %p, %Zd", info.oldval, oldlen,
info.newval, info.newlen);
}
- tprintf("}");
+ tprints("}");
}
free(name);
@@ -2087,7 +2087,7 @@
if (tcp->u_arg[1] < 0 || tcp->u_arg[1] > CTL_MAXNAME ||
(umoven(tcp, tcp->u_arg[0], tcp->u_arg[1] * sizeof(int),
(char *) (qoid + 2)) < 0))
- tprintf("[...], ");
+ tprints("[...], ");
else {
/* Use sysctl to ask the name of the current MIB
This uses the undocumented "Staff-functions" used
@@ -2096,7 +2096,7 @@
qoid[0] = 0; /* sysctl */
qoid[1] = 1; /* name */
i = sizeof(ctl);
- tprintf("[");
+ tprints("[");
if (sysctl(qoid, tcp->u_arg[1] + 2, ctl, &i, 0, 0) >= 0) {
numeric = !abbrev(tcp);
tprintf("%s%s", ctl, numeric ? ", " : "");
@@ -2106,7 +2106,7 @@
for (i = 0; i < tcp->u_arg[1]; i++)
tprintf("%s%d", i ? "." : "", qoid[i + 2]);
}
- tprintf("], ");
+ tprints("], ");
tprintf("%lu, ", tcp->u_arg[1]);
}
} else {
@@ -2139,7 +2139,7 @@
{
if (entering(tcp)) {
printstr(tcp, tcp->u_arg[0], -1);
- tprintf(", ");
+ tprints(", ");
}
else {
if (syserror(tcp)) {
@@ -2149,14 +2149,14 @@
else {
int val;
printnum(tcp, tcp->u_arg[1], "%#lx");
- tprintf(", ");
+ tprints(", ");
if (umove(tcp, tcp->u_arg[2], &val) < 0) {
tprintf("%#lx", tcp->u_arg[2]);
}
else {
- tprintf("[");
+ tprints("[");
printxval(ksym_flags, val, "STT_???");
- tprintf("]");
+ tprints("]");
}
}
}
@@ -2230,7 +2230,7 @@
tprintf("%#lx, %ld", tcp->u_arg[0], tcp->u_arg[1]);
return 0;
}
- tprintf("{id=");
+ tprints("{id=");
printxval(ssi_cmd, iov.tio_id.id_cmd, "SSISYS_???");
tprintf(":%d", iov.tio_id.id_ver);
switch (iov.tio_id.id_cmd) {
diff --git a/term.c b/term.c
index 23d2317..fbdb165 100644
--- a/term.c
+++ b/term.c
@@ -212,15 +212,15 @@
if (!verbose(tcp) || umove(tcp, arg, &tios) < 0)
return 0;
if (abbrev(tcp)) {
- tprintf(", {");
+ tprints(", {");
#ifndef FREEBSD
printxval(baud_options, tios.c_cflag & CBAUD, "B???");
#else
printxval(baud_options, tios.c_ispeed, "B???");
if (tios.c_ispeed != tios.c_ospeed) {
- tprintf(" (in)");
+ tprints(" (in)");
printxval(baud_options, tios.c_ospeed, "B???");
- tprintf(" (out)");
+ tprints(" (out)");
}
#endif
tprintf(" %sopost %sisig %sicanon %secho ...}",
@@ -257,7 +257,7 @@
if (!verbose(tcp) || umove(tcp, arg, &tio) < 0)
return 0;
if (abbrev(tcp)) {
- tprintf(", {");
+ tprints(", {");
printxval(baud_options, tio.c_cflag & CBAUD, "B???");
tprintf(" %sopost %sisig %sicanon %secho ...}",
(tio.c_oflag & OPOST) ? "" : "-",
@@ -316,13 +316,13 @@
/* ioctls with a direct decodable arg */
#ifdef TCXONC
case TCXONC:
- tprintf(", ");
+ tprints(", ");
printxval(tcxonc_options, arg, "TC???");
return 1;
#endif
#ifdef TCLFLSH
case TCFLSH:
- tprintf(", ");
+ tprints(", ");
printxval(tcflsh_options, arg, "TC???");
return 1;
#endif
@@ -336,9 +336,9 @@
case TIOCMSET:
if (umove(tcp, arg, &i) < 0)
return 0;
- tprintf(", [");
+ tprints(", [");
printflags(modem_flags, i, "TIOCM_???");
- tprintf("]");
+ tprints("]");
return 1;
#endif /* TIOCMGET */
@@ -410,7 +410,7 @@
#ifdef TIOCGPTN
case TIOCGPTN:
#endif
- tprintf(", ");
+ tprints(", ");
printnum_int(tcp, arg, "%d");
return 1;
@@ -419,7 +419,7 @@
#ifdef TIOCSTI
case TIOCSTI:
#endif
- tprintf(", ");
+ tprints(", ");
printstr(tcp, arg, 1);
return 1;
diff --git a/time.c b/time.c
index 89a6216..932c71f 100644
--- a/time.c
+++ b/time.c
@@ -67,7 +67,7 @@
printtv_bitness(struct tcb *tcp, long addr, enum bitness_t bitness, int special)
{
if (addr == 0)
- tprintf("NULL");
+ tprints("NULL");
else if (!verbose(tcp))
tprintf("%#lx", addr);
else {
@@ -85,10 +85,10 @@
if (rc >= 0) {
if (special && tv.tv_sec == 0 &&
tv.tv_usec == UTIME_NOW)
- tprintf("UTIME_NOW");
+ tprints("UTIME_NOW");
else if (special && tv.tv_sec == 0 &&
tv.tv_usec == UTIME_OMIT)
- tprintf("UTIME_OMIT");
+ tprints("UTIME_OMIT");
else
tprint_timeval32(tcp, &tv);
}
@@ -99,16 +99,16 @@
if (rc >= 0) {
if (special && tv.tv_sec == 0 &&
tv.tv_usec == UTIME_NOW)
- tprintf("UTIME_NOW");
+ tprints("UTIME_NOW");
else if (special && tv.tv_sec == 0 &&
tv.tv_usec == UTIME_OMIT)
- tprintf("UTIME_OMIT");
+ tprints("UTIME_OMIT");
else
tprint_timeval(tcp, &tv);
}
}
if (rc < 0)
- tprintf("{...}");
+ tprints("{...}");
}
}
@@ -155,7 +155,7 @@
void print_timespec(struct tcb *tcp, long addr)
{
if (addr == 0)
- tprintf("NULL");
+ tprints("NULL");
else if (!verbose(tcp))
tprintf("%#lx", addr);
else {
@@ -181,7 +181,7 @@
(unsigned long) ts.tv_nsec);
}
if (rc < 0)
- tprintf("{...}");
+ tprints("{...}");
}
}
@@ -249,7 +249,7 @@
}
printtv(tcp, tcp->u_arg[0]);
#ifndef SVR4
- tprintf(", ");
+ tprints(", ");
printtv(tcp, tcp->u_arg[1]);
#endif /* !SVR4 */
}
@@ -268,7 +268,7 @@
}
printtv_bitness(tcp, tcp->u_arg[0], BITNESS_32, 0);
#ifndef SVR4
- tprintf(", ");
+ tprints(", ");
printtv_bitness(tcp, tcp->u_arg[1], BITNESS_32, 0);
#endif /* !SVR4 */
}
@@ -282,7 +282,7 @@
if (entering(tcp)) {
printtv(tcp, tcp->u_arg[0]);
#ifndef SVR4
- tprintf(", ");
+ tprints(", ");
printtv(tcp, tcp->u_arg[1]);
#endif /* !SVR4 */
}
@@ -296,7 +296,7 @@
if (entering(tcp)) {
printtv_bitness(tcp, tcp->u_arg[0], BITNESS_32, 0);
#ifndef SVR4
- tprintf(", ");
+ tprints(", ");
printtv_bitness(tcp, tcp->u_arg[1], BITNESS_32, 0);
#endif /* !SVR4 */
}
@@ -309,7 +309,7 @@
{
if (entering(tcp)) {
printtv(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
} else {
if (syserror(tcp))
tprintf("%#lx", tcp->u_arg[1]);
@@ -324,7 +324,7 @@
{
if (entering(tcp)) {
print_timespec(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
} else {
if (!tcp->u_arg[1] || is_restart_error(tcp))
print_timespec(tcp, tcp->u_arg[1]);
@@ -345,7 +345,7 @@
printitv_bitness(struct tcb *tcp, long addr, enum bitness_t bitness)
{
if (addr == 0)
- tprintf("NULL");
+ tprints("NULL");
else if (!verbose(tcp))
tprintf("%#lx", addr);
else {
@@ -363,26 +363,26 @@
rc = umove(tcp, addr, &itv);
if (rc >= 0) {
- tprintf("{it_interval=");
+ tprints("{it_interval=");
tprint_timeval32(tcp, &itv.it_interval);
- tprintf(", it_value=");
+ tprints(", it_value=");
tprint_timeval32(tcp, &itv.it_value);
- tprintf("}");
+ tprints("}");
}
} else {
struct itimerval itv;
rc = umove(tcp, addr, &itv);
if (rc >= 0) {
- tprintf("{it_interval=");
+ tprints("{it_interval=");
tprint_timeval(tcp, &itv.it_interval);
- tprintf(", it_value=");
+ tprints(", it_value=");
tprint_timeval(tcp, &itv.it_value);
- tprintf("}");
+ tprints("}");
}
}
if (rc < 0)
- tprintf("{...}");
+ tprints("{...}");
}
}
@@ -394,7 +394,7 @@
{
if (entering(tcp)) {
printxval(which, tcp->u_arg[0], "ITIMER_???");
- tprintf(", ");
+ tprints(", ");
} else {
if (syserror(tcp))
tprintf("%#lx", tcp->u_arg[1]);
@@ -411,7 +411,7 @@
{
if (entering(tcp)) {
printxval(which, tcp->u_arg[0], "ITIMER_???");
- tprintf(", ");
+ tprints(", ");
} else {
if (syserror(tcp))
tprintf("%#lx", tcp->u_arg[1]);
@@ -427,9 +427,9 @@
{
if (entering(tcp)) {
printxval(which, tcp->u_arg[0], "ITIMER_???");
- tprintf(", ");
+ tprints(", ");
printitv(tcp, tcp->u_arg[1]);
- tprintf(", ");
+ tprints(", ");
} else {
if (syserror(tcp))
tprintf("%#lx", tcp->u_arg[2]);
@@ -445,9 +445,9 @@
{
if (entering(tcp)) {
printxval(which, tcp->u_arg[0], "ITIMER_???");
- tprintf(", ");
+ tprints(", ");
printitv_bitness(tcp, tcp->u_arg[1], BITNESS_32);
- tprintf(", ");
+ tprints(", ");
} else {
if (syserror(tcp))
tprintf("%#lx", tcp->u_arg[2]);
@@ -583,7 +583,7 @@
if (umove(tcp, addr, &tx) < 0)
return -1;
- tprintf("{modes=");
+ tprints("{modes=");
printflags(adjtimex_modes, tx.modes, "ADJ_???");
tprintf(", offset=%d, freq=%d, maxerror=%d, ",
tx.offset, tx.freq, tx.maxerror);
@@ -599,7 +599,7 @@
tx.shift, tx.stabil, tx.jitcnt);
tprintf(", calcnt=%d, errcnt=%d, stbcnt=%d",
tx.calcnt, tx.errcnt, tx.stbcnt);
- tprintf("}");
+ tprints("}");
return 0;
}
#endif /* SUPPORTED_PERSONALITIES > 1 */
@@ -626,7 +626,7 @@
tprintf("tolerance=%ld, time=", tx.tolerance);
tprint_timeval(tcp, &tx.time);
#else
- tprintf("{modes=");
+ tprints("{modes=");
printflags(adjtimex_modes, tx.modes, "ADJ_???");
tprintf(", offset=%ld, freq=%ld, maxerror=%ld, ",
tx.offset, tx.freq, tx.maxerror);
@@ -643,7 +643,7 @@
tprintf(", calcnt=%ld, errcnt=%ld, stbcnt=%ld",
tx.calcnt, tx.errcnt, tx.stbcnt);
#endif
- tprintf("}");
+ tprints("}");
return 0;
}
@@ -652,11 +652,11 @@
{
if (exiting(tcp)) {
if (tcp->u_arg[0] == 0)
- tprintf("NULL");
+ tprints("NULL");
else if (syserror(tcp) || !verbose(tcp))
tprintf("%#lx", tcp->u_arg[0]);
else if (tprint_timex(tcp, tcp->u_arg[0]) < 0)
- tprintf("{...}");
+ tprints("{...}");
if (syserror(tcp))
return 0;
tcp->auxstr = xlookup(adjtimex_state, tcp->u_rval);
@@ -701,7 +701,7 @@
{
if (entering(tcp)) {
printxval(clocknames, tcp->u_arg[0], "CLOCK_???");
- tprintf(", ");
+ tprints(", ");
printtv(tcp, tcp->u_arg[1]);
}
return 0;
@@ -712,7 +712,7 @@
{
if (entering(tcp)) {
printxval(clocknames, tcp->u_arg[0], "CLOCK_???");
- tprintf(", ");
+ tprints(", ");
} else {
if (syserror(tcp))
tprintf("%#lx", tcp->u_arg[1]);
@@ -727,11 +727,11 @@
{
if (entering(tcp)) {
printxval(clocknames, tcp->u_arg[0], "CLOCK_???");
- tprintf(", ");
+ tprints(", ");
printflags(clockflags, tcp->u_arg[1], "TIMER_???");
- tprintf(", ");
+ tprints(", ");
printtv(tcp, tcp->u_arg[2]);
- tprintf(", ");
+ tprints(", ");
} else {
if (syserror(tcp))
tprintf("%#lx", tcp->u_arg[3]);
@@ -770,7 +770,7 @@
} sev;
if (umove(tcp, arg, &sev) < 0)
- tprintf("{...}");
+ tprints("{...}");
else {
tprintf("{%#x, ", sev.sigev_value);
if (sev.sigev_notify == SIGEV_SIGNAL)
@@ -778,7 +778,7 @@
else
tprintf("%u, ", sev.sigev_signo);
printxval(sigev_value, sev.sigev_notify + 1, "SIGEV_???");
- tprintf(", ");
+ tprints(", ");
if (sev.sigev_notify == SIGEV_THREAD_ID)
tprintf("{%d}", sev.un.tid);
else if (sev.sigev_notify == SIGEV_THREAD)
@@ -786,8 +786,8 @@
sev.un.thread.function,
sev.un.thread.attribute);
else
- tprintf("{...}");
- tprintf("}");
+ tprints("{...}");
+ tprints("}");
}
}
#endif
@@ -804,7 +804,7 @@
}
#endif
if (umove(tcp, arg, &sev) < 0)
- tprintf("{...}");
+ tprints("{...}");
else {
tprintf("{%p, ", sev.sigev_value.sival_ptr);
if (sev.sigev_notify == SIGEV_SIGNAL)
@@ -812,7 +812,7 @@
else
tprintf("%u, ", sev.sigev_signo);
printxval(sigev_value, sev.sigev_notify+1, "SIGEV_???");
- tprintf(", ");
+ tprints(", ");
if (sev.sigev_notify == SIGEV_THREAD_ID)
/* _pad[0] is the _tid field which might not be
present in the userlevel definition of the
@@ -822,8 +822,8 @@
tprintf("{%p, %p}", sev.sigev_notify_function,
sev.sigev_notify_attributes);
else
- tprintf("{...}");
- tprintf("}");
+ tprints("{...}");
+ tprints("}");
}
}
@@ -832,9 +832,9 @@
{
if (entering(tcp)) {
printxval(clocknames, tcp->u_arg[0], "CLOCK_???");
- tprintf(", ");
+ tprints(", ");
printsigevent(tcp, tcp->u_arg[1]);
- tprintf(", ");
+ tprints(", ");
} else {
int timer_id;
@@ -852,9 +852,9 @@
if (entering(tcp)) {
tprintf("%#lx, ", tcp->u_arg[0]);
printflags(clockflags, tcp->u_arg[1], "TIMER_???");
- tprintf(", ");
+ tprints(", ");
printitv(tcp, tcp->u_arg[2]);
- tprintf(", ");
+ tprints(", ");
} else {
if (syserror(tcp))
tprintf("%#lx", tcp->u_arg[3]);
@@ -889,7 +889,7 @@
tprintf("tm_wday=%d, tm_yday=%d, tm_isdst=%d}",
rt->tm_wday, rt->tm_yday, rt->tm_isdst);
else
- tprintf("...}");
+ tprints("...}");
}
int
@@ -903,7 +903,7 @@
if (umove(tcp, arg, &rt) < 0)
tprintf(", %#lx", arg);
else {
- tprintf(", ");
+ tprints(", ");
print_rtc(tcp, &rt);
}
}
@@ -915,7 +915,7 @@
if (syserror(tcp) || umove(tcp, arg, &rt) < 0)
tprintf(", %#lx", arg);
else {
- tprintf(", ");
+ tprints(", ");
print_rtc(tcp, &rt);
}
}
@@ -939,7 +939,7 @@
tprintf(", {enabled=%d, pending=%d, ",
wk.enabled, wk.pending);
print_rtc(tcp, &wk.time);
- tprintf("}");
+ tprints("}");
}
}
break;
@@ -952,7 +952,7 @@
tprintf(", {enabled=%d, pending=%d, ",
wk.enabled, wk.pending);
print_rtc(tcp, &wk.time);
- tprintf("}");
+ tprints("}");
}
}
break;
@@ -980,9 +980,9 @@
/* It does not matter that the kernel uses itimerspec. */
tprintf("%ld, ", tcp->u_arg[0]);
printxval(clocknames, tcp->u_arg[1], "CLOCK_???");
- tprintf(", ");
+ tprints(", ");
printflags(timerfdflags, tcp->u_arg[2], "TFD_???");
- tprintf(", ");
+ tprints(", ");
printitv(tcp, tcp->u_arg[3]);
}
return 0;
@@ -993,7 +993,7 @@
{
if (entering(tcp)) {
printxval(clocknames, tcp->u_arg[0], "CLOCK_???");
- tprintf(", ");
+ tprints(", ");
printflags(timerfdflags, tcp->u_arg[1], "TFD_???");
}
return 0;
@@ -1004,11 +1004,11 @@
{
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
printflags(timerfdflags, tcp->u_arg[1], "TFD_???");
- tprintf(", ");
+ tprints(", ");
printitv(tcp, tcp->u_arg[2]);
- tprintf(", ");
+ tprints(", ");
printitv(tcp, tcp->u_arg[3]);
}
return 0;
@@ -1019,7 +1019,7 @@
{
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
- tprintf(", ");
+ tprints(", ");
printitv(tcp, tcp->u_arg[1]);
}
return 0;
diff --git a/util.c b/util.c
index 7f1c626..0277deb 100644
--- a/util.c
+++ b/util.c
@@ -366,7 +366,7 @@
tprintf(" /* %s */", dflt);
} else {
if (dflt)
- tprintf("0");
+ tprints("0");
}
}
@@ -379,16 +379,16 @@
long num;
if (!addr) {
- tprintf("NULL");
+ tprints("NULL");
return;
}
if (umove(tcp, addr, &num) < 0) {
tprintf("%#lx", addr);
return;
}
- tprintf("[");
+ tprints("[");
tprintf(fmt, num);
- tprintf("]");
+ tprints("]");
}
void
@@ -397,16 +397,16 @@
int num;
if (!addr) {
- tprintf("NULL");
+ tprints("NULL");
return;
}
if (umove(tcp, addr, &num) < 0) {
tprintf("%#lx", addr);
return;
}
- tprintf("[");
+ tprints("[");
tprintf(fmt, num);
- tprintf("]");
+ tprints("]");
}
void
@@ -566,7 +566,7 @@
printpathn(struct tcb *tcp, long addr, int n)
{
if (!addr) {
- tprintf("NULL");
+ tprints("NULL");
return;
}
@@ -614,7 +614,7 @@
const char *fmt;
if (!addr) {
- tprintf("NULL");
+ tprints("NULL");
return;
}
/* Allocate static buffers if they are not allocated yet. */
@@ -1124,7 +1124,7 @@
long pc;
if (upeek(tcp, 4*PT_PC, &pc) < 0) {
- tprintf("[????????] ");
+ tprints("[????????] ");
return;
}
tprintf("[%08lx] ", pc);
@@ -1132,7 +1132,7 @@
long pc;
if (upeek(tcp, REG_PC, &pc) < 0) {
- tprintf("[????????????????] ");
+ tprints("[????????????????] ");
return;
}
tprintf("[%08lx] ", pc);
@@ -1151,7 +1151,7 @@
long pc;
if (upeek(tcp, PT_IAOQ0, &pc) < 0) {
- tprintf("[????????] ");
+ tprints("[????????] ");
return;
}
tprintf("[%08lx] ", pc);
@@ -1159,7 +1159,7 @@
long pc;
if (upeek(tcp, REG_EPC, &pc) < 0) {
- tprintf("[????????] ");
+ tprints("[????????] ");
return;
}
tprintf("[%08lx] ", pc);
@@ -1167,7 +1167,7 @@
long pc;
if (upeek(tcp, 4*REG_PC, &pc) < 0) {
- tprintf("[????????] ");
+ tprints("[????????] ");
return;
}
tprintf("[%08lx] ", pc);
@@ -1175,7 +1175,7 @@
long pc;
if (upeek(tcp, REG_PC, &pc) < 0) {
- tprintf("[????????????????] ");
+ tprints("[????????????????] ");
return;
}
tprintf("[%08lx] ", pc);
@@ -1191,7 +1191,7 @@
long pc;
if (upeek(tcp, REG_PC, &pc) < 0) {
- tprintf("[????????] ");
+ tprints("[????????] ");
return;
}
tprintf("[%08lx] ", pc);