- tprintf("%ld, ", tcp->u_arg[0]);
- } else {
- if (syserror(tcp))
- tprintf("%#lx", tcp->u_arg[1]);
- else
- printstr(tcp, tcp->u_arg[1], tcp->u_rval);
- tprintf(", %lu, %#llx", tcp->u_arg[2], get64(tcp->u_arg[3], tcp->u_arg[4]));
+ printfd(tcp, tcp->u_arg[0]);
+ tprints(", ");
+ printfd(tcp, tcp->u_arg[1]);
+ tprints(", ");
+ print_loff_t(tcp, tcp->u_arg[2]);
+ tprintf(", %lu", tcp->u_arg[3]);
+ }
+ return 0;
+}
+
+static const struct xlat splice_flags[] = {
+#ifdef SPLICE_F_MOVE
+ { SPLICE_F_MOVE, "SPLICE_F_MOVE" },
+#endif
+#ifdef SPLICE_F_NONBLOCK
+ { SPLICE_F_NONBLOCK, "SPLICE_F_NONBLOCK" },
+#endif
+#ifdef SPLICE_F_MORE
+ { SPLICE_F_MORE, "SPLICE_F_MORE" },
+#endif
+#ifdef SPLICE_F_GIFT
+ { SPLICE_F_GIFT, "SPLICE_F_GIFT" },
+#endif
+ { 0, NULL },
+};
+
+int
+sys_tee(struct tcb *tcp)
+{
+ if (entering(tcp)) {
+ /* int fd_in */
+ printfd(tcp, tcp->u_arg[0]);
+ tprints(", ");
+ /* int fd_out */
+ printfd(tcp, tcp->u_arg[1]);
+ tprints(", ");
+ /* size_t len */
+ tprintf("%lu, ", tcp->u_arg[2]);
+ /* unsigned int flags */
+ printflags(splice_flags, tcp->u_arg[3], "SPLICE_F_???");