+
+int
+sys_setxattr(tcp)
+struct tcb *tcp;
+{
+ if (entering(tcp)) {
+ printpath(tcp, tcp->u_arg[0]);
+ tprintf(", ");
+ 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(", ");
+ printflags(xattrflags, tcp->u_arg[4], "XATTR_???");
+ }
+ return 0;
+}
+
+int
+sys_fsetxattr(tcp)
+struct tcb *tcp;
+{
+ if (entering(tcp)) {
+ tprintf("%ld, ", tcp->u_arg[0]);
+ 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(", ");
+ printflags(xattrflags, tcp->u_arg[4], "XATTR_???");
+ }
+ return 0;
+}
+
+int
+sys_getxattr(tcp)
+struct tcb *tcp;
+{
+ if (entering(tcp)) {
+ printpath(tcp, tcp->u_arg[0]);
+ tprintf(", ");
+ printstr(tcp, tcp->u_arg[1], -1);
+ } else {
+ print_xattr_val(tcp, syserror(tcp), tcp->u_arg[2], tcp->u_arg[3],
+ tcp->u_rval);
+ }
+ return 0;
+}
+
+int
+sys_fgetxattr(tcp)
+struct tcb *tcp;
+{
+ if (entering(tcp)) {
+ tprintf("%ld, ", tcp->u_arg[0]);
+ printstr(tcp, tcp->u_arg[1], -1);
+ } else {
+ print_xattr_val(tcp, syserror(tcp), tcp->u_arg[2], tcp->u_arg[3],
+ tcp->u_rval);
+ }
+ return 0;
+}
+
+int
+sys_listxattr(tcp)
+struct tcb *tcp;
+{
+ if (entering(tcp)) {
+ printpath(tcp, tcp->u_arg[0]);
+ } else {
+ /* XXX Print value in format */
+ tprintf(", %p, %lu", (void *) tcp->u_arg[1], tcp->u_arg[2]);
+ }
+ return 0;
+}
+
+int
+sys_flistxattr(tcp)
+struct tcb *tcp;
+{
+ if (entering(tcp)) {
+ tprintf("%ld", tcp->u_arg[0]);
+ } else {
+ /* XXX Print value in format */
+ tprintf(", %p, %lu", (void *) tcp->u_arg[1], tcp->u_arg[2]);
+ }
+ return 0;
+}
+
+int
+sys_removexattr(tcp)
+struct tcb *tcp;
+{
+ if (entering(tcp)) {
+ printpath(tcp, tcp->u_arg[0]);
+ tprintf(", ");
+ printstr(tcp, tcp->u_arg[1], -1);
+ }
+ return 0;
+}
+
+int
+sys_fremovexattr(tcp)
+struct tcb *tcp;
+{
+ if (entering(tcp)) {
+ tprintf("%ld, ", tcp->u_arg[0]);
+ printstr(tcp, tcp->u_arg[1], -1);
+ }
+ return 0;
+}
+
+
+static const struct xlat advise[] = {
+ { POSIX_FADV_NORMAL, "POSIX_FADV_NORMAL" },
+ { POSIX_FADV_RANDOM, "POSIX_FADV_RANDOM" },
+ { POSIX_FADV_SEQUENTIAL, "POSIX_FADV_SEQUENTIAL" },
+ { POSIX_FADV_WILLNEED, "POSIX_FADV_WILLNEED" },
+ { POSIX_FADV_DONTNEED, "POSIX_FADV_DONTNEED" },
+ { POSIX_FADV_NOREUSE, "POSIX_FADV_NOREUSE" },
+ { 0, NULL }
+};
+
+
+#ifdef LINUX
+int
+sys_fadvise64(tcp)
+struct tcb *tcp;
+{
+ if (entering(tcp)) {
+ tprintf("%ld, %lld, %ld, ",
+ tcp->u_arg[0],
+# if defined IA64 || defined X86_64 || defined ALPHA
+ (long long int) tcp->u_arg[1], tcp->u_arg[2]);
+ printxval(advise, tcp->u_arg[3], "POSIX_FADV_???");
+#else
+ LONG_LONG(tcp->u_arg[1], tcp->u_arg[2]), tcp->u_arg[3]);
+ printxval(advise, tcp->u_arg[4], "POSIX_FADV_???");
+#endif
+ }
+ return 0;
+}
+#endif
+
+
+int
+sys_fadvise64_64(tcp)
+struct tcb *tcp;
+{
+ if (entering(tcp)) {
+ tprintf("%ld, %lld, %lld, ",
+ tcp->u_arg[0],
+# if defined IA64 || defined X86_64 || defined ALPHA
+ (long long int) tcp->u_arg[1], (long long int) tcp->u_arg[2]);
+ printxval(advise, tcp->u_arg[3], "POSIX_FADV_???");
+#else
+ LONG_LONG(tcp->u_arg[1], tcp->u_arg[2]),
+ LONG_LONG(tcp->u_arg[3], tcp->u_arg[4]));
+ printxval(advise, tcp->u_arg[5], "POSIX_FADV_???");