+ tprintf("{...}");
+ }
+ }
+ return 0;
+}
+
+int
+sys_io_destroy(tcp)
+struct tcb *tcp;
+{
+ if (entering(tcp))
+ tprintf("%lu", tcp->u_arg[0]);
+ return 0;
+}
+
+int
+sys_io_submit(tcp)
+struct tcb *tcp;
+{
+ long nr;
+ if (entering(tcp)) {
+ tprintf("%lu, %ld, ", tcp->u_arg[0], tcp->u_arg[1]);
+ nr = tcp->u_arg[1];
+ /* and if nr is negative? */
+ if (nr == 0)
+ tprintf("{}");
+ else {
+#ifdef HAVE_LIBAIO_H
+ long i;
+ struct iocb *iocbp, **iocbs = (void *)tcp->u_arg[2];
+
+ for (i = 0; i < nr; i++, iocbs++) {
+ struct iocb iocb;
+ if (i == 0)
+ tprintf("{");
+ else
+ tprintf(", ");
+
+ if (umove(tcp, (unsigned long)iocbs, &iocbp) ||
+ umove(tcp, (unsigned long)iocbp, &iocb)) {
+ tprintf("{...}");
+ continue;
+ }
+ tprintf("{%p, %u, %hu, %hu, %d}",
+ iocb.data, iocb.key,
+ iocb.aio_lio_opcode,
+ iocb.aio_reqprio, iocb.aio_fildes);
+ }
+ if (i)
+ tprintf("}");
+#else
+ tprintf("{...}");
+#endif
+ }
+ }
+ return 0;
+}
+
+int
+sys_io_cancel(tcp)
+struct tcb *tcp;
+{
+ if (entering(tcp)) {
+#ifdef HAVE_LIBAIO_H
+ struct iocb iocb;
+#endif
+ tprintf("%lu, ", tcp->u_arg[0]);
+#ifdef HAVE_LIBAIO_H
+ if (umove(tcp, tcp->u_arg[1], &iocb) == 0) {
+ tprintf("{%p, %u, %hu, %hu, %d}, ",
+ iocb.data, iocb.key,
+ iocb.aio_lio_opcode,
+ iocb.aio_reqprio, iocb.aio_fildes);
+ } else
+#endif
+ tprintf("{...}, ");
+ } else {
+ if (tcp->u_rval < 0)
+ tprintf("{...}");
+ else {
+#ifdef HAVE_LIBAIO_H
+ struct io_event event;
+ if (umove(tcp, tcp->u_arg[2], &event) == 0)
+ tprintf("{%p, %p, %ld, %ld}",
+ event.data, event.obj,
+ event.res, event.res2);
+ else