+ if (entering(tcp)) {
+ tprintf("%lu, ", tcp->u_arg[0]);
+ return 0;
+ }
+ if (syserror(tcp) || !verbose(tcp)) {
+ tprintf("%#lx, %lu, %#lx", tcp->u_arg[1], tcp->u_arg[2], tcp->u_arg[3]);
+ return 0;
+ }
+ len = tcp->u_rval;
+ if ((buf = malloc(len)) == NULL) {
+ tprintf("out of memory\n");
+ return 0;
+ }
+ if (umoven(tcp, tcp->u_arg[1], len, buf) < 0) {
+ tprintf("{...}, %lu, %#lx", tcp->u_arg[2], tcp->u_arg[3]);
+ free(buf);
+ return 0;
+ }
+ if (!abbrev(tcp))
+ tprintf("{");
+ for (i = 0; i < len;) {
+ struct kernel_dirent *d = (struct kernel_dirent *) &buf[i];
+ if (!abbrev(tcp)) {
+ tprintf("%s{d_fileno=%u, d_reclen=%u, d_type=",
+ i ? " " : "", d->d_fileno, d->d_reclen);
+ printxval(direnttypes, d->d_type, "DT_???");
+ tprintf(", d_namlen=%u, d_name=\"%.*s\"}",
+ d->d_namlen, d->d_namlen, d->d_name);
+ }
+ i += d->d_reclen;
+ dents++;
+ }
+ if (!abbrev(tcp))
+ tprintf("}");
+ else
+ tprintf("/* %u entries */", dents);
+ free(buf);
+ tprintf(", %lu", tcp->u_arg[2]);
+ if (umove(tcp, tcp->u_arg[3], &basep) < 0)
+ tprintf(", %#lx", tcp->u_arg[3]);
+ else
+ tprintf(", [%lu]", basep);
+ return 0;
+}
+#endif
+
+#ifdef linux