2 * Copyright (c) 1991, 1992 Paul Kranenburg <pk@cs.few.eur.nl>
3 * Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
4 * Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 * 3. The name of the author may not be used to endorse or promote products
16 * derived from this software without specific prior written permission.
18 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
19 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
22 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
40 # include <sys/cred.h>
45 #ifdef MAJOR_IN_SYSMACROS
46 #include <sys/sysmacros.h>
50 #include <sys/mkdev.h>
53 #ifdef HAVE_SYS_ASYNCH_H
54 #include <sys/asynch.h>
62 * This is a really dirty trick but it should always work. Traditional
63 * Unix says r/w/rw are 0/1/2, so we make them true flags 1/2/3 by
64 * adding 1. Just remember to add 1 to any arg decoded with openmodes.
66 struct xlat openmodes[] = {
67 { O_RDWR+1, "O_RDWR" },
68 { O_RDONLY+1, "O_RDONLY" },
69 { O_WRONLY+1, "O_WRONLY" },
70 { O_NONBLOCK, "O_NONBLOCK" },
71 { O_APPEND, "O_APPEND" },
72 { O_CREAT, "O_CREAT" },
73 { O_TRUNC, "O_TRUNC" },
75 { O_NOCTTY, "O_NOCTTY" },
80 { O_ASYNC, "O_ASYNC" },
83 { O_DSYNC, "O_DSYNC" },
86 { O_RSYNC, "O_RSYNC" },
89 { O_NDELAY, "O_NDELAY" },
95 { O_DIRECT, "O_DIRECT" },
98 { O_LARGEFILE, "O_LARGEFILE" },
101 { O_DIRECTORY, "O_DIRECTORY" },
105 { FNDELAY, "FNDELAY" },
108 { FAPPEND, "FAPPEND" },
114 { FDEFER, "FDEFER" },
117 { FASYNC, "FASYNC" },
120 { FSHLOCK, "FSHLOCK" },
123 { FEXLOCK, "FEXLOCK" },
126 { FCREAT, "FCREAT" },
129 { FTRUNC, "FTRUNC" },
141 { FNOCTTY, "FNOCTTY" },
151 printpath(tcp, tcp->u_arg[0]);
154 printflags(openmodes, tcp->u_arg[1] + 1);
155 if (tcp->u_arg[1] & O_CREAT) {
157 tprintf(", %#lo", tcp->u_arg[2]);
164 struct xlat openmodessol[] = {
168 { 0x80, "O_NONBLOCK" },
170 { 0x100, "O_CREAT" },
171 { 0x200, "O_TRUNC" },
173 { 0x800, "O_NOCTTY" },
176 { 0x8000, "O_RSYNC" },
178 { 0x1000, "O_PRIV" },
187 printpath(tcp, tcp->u_arg[0]);
190 printflags(openmodessol, tcp->u_arg[1] + 1);
191 if (tcp->u_arg[1] & 0x100) {
193 tprintf(", %#lo", tcp->u_arg[2]);
206 printpath(tcp, tcp->u_arg[0]);
207 tprintf(", %#lo", tcp->u_arg[1]);
212 static struct xlat access_flags[] = {
218 { EFF_ONLY_OK, "EFF_ONLY_OK" },
231 printpath(tcp, tcp->u_arg[0]);
233 printflags(access_flags, tcp->u_arg[1]);
243 tprintf("%#lo", tcp->u_arg[0]);
248 static struct xlat whence[] = {
249 { SEEK_SET, "SEEK_SET" },
250 { SEEK_CUR, "SEEK_CUR" },
251 { SEEK_END, "SEEK_END" },
260 tprintf("%ld, ", tcp->u_arg[0]);
261 if (tcp->u_arg[2] == SEEK_SET)
262 tprintf("%lu, ", tcp->u_arg[1]);
264 tprintf("%ld, ", tcp->u_arg[1]);
265 printxval(whence, tcp->u_arg[2], "SEEK_???");
267 return RVAL_UDECIMAL;
276 if (tcp->u_arg[4] == SEEK_SET)
277 tprintf("%ld, %llu, ", tcp->u_arg[0],
278 (((unsigned long long int) tcp->u_arg[1]) << 32
279 | (unsigned long) tcp->u_arg[2]));
281 tprintf("%ld, %lld, ", tcp->u_arg[0],
282 (((long long int) tcp->u_arg[1]) << 32
283 | (unsigned long) tcp->u_arg[2]));
287 tprintf("%#lx, ", tcp->u_arg[3]);
290 umove(tcp, tcp->u_arg[3], &off);
291 tprintf("{%lld}, ", off);
293 printxval(whence, tcp->u_arg[4], "SEEK_???");
304 printpath(tcp, tcp->u_arg[0]);
305 tprintf(", %lu", tcp->u_arg[1]);
315 tprintf("%ld, %lu", tcp->u_arg[0], tcp->u_arg[1]);
322 static struct xlat modetypes[] = {
323 { S_IFREG, "S_IFREG" },
324 { S_IFSOCK, "S_IFSOCK" },
325 { S_IFIFO, "S_IFIFO" },
326 { S_IFLNK, "S_IFLNK" },
327 { S_IFDIR, "S_IFDIR" },
328 { S_IFBLK, "S_IFBLK" },
329 { S_IFCHR, "S_IFCHR" },
340 if ((mode & S_IFMT) == 0)
342 else if ((s = xlookup(modetypes, mode & S_IFMT)) == NULL) {
343 sprintf(buf, "%#o", mode);
346 sprintf(buf, "%s%s%s%s", s,
347 (mode & S_ISUID) ? "|S_ISUID" : "",
348 (mode & S_ISGID) ? "|S_ISGID" : "",
349 (mode & S_ISVTX) ? "|S_ISVTX" : "");
350 mode &= ~(S_IFMT|S_ISUID|S_ISGID|S_ISVTX);
352 sprintf(buf + strlen(buf), "|%#o", mode);
353 s = (*buf == '|') ? buf + 1 : buf;
369 sprintf(buf, "%02d/%02d/%02d-%02d:%02d:%02d",
370 tmp->tm_year, tmp->tm_mon + 1, tmp->tm_mday,
371 tmp->tm_hour, tmp->tm_min, tmp->tm_sec);
383 int st_pad1[3]; /* network id */
392 int st_pad3; /* st_size, off_t expansion */
393 timestruct_t st_atime;
394 timestruct_t st_mtime;
395 timestruct_t st_ctime;
399 int st_pad4[8]; /* expansion area */
403 printstatsol(tcp, addr)
407 struct solstat statbuf;
413 if (syserror(tcp) || !verbose(tcp)) {
414 tprintf("%#x", addr);
417 if (umove(tcp, addr, &statbuf) < 0) {
422 tprintf("{st_dev=makedev(%lu, %lu), st_ino=%lu, st_mode=%s, ",
423 (unsigned long) ((statbuf.st_dev >> 18) & 0x3fff),
424 (unsigned long) (statbuf.st_dev & 0x3ffff),
425 (unsigned long) statbuf.st_ino,
426 sprintmode(statbuf.st_mode));
427 tprintf("st_nlink=%lu, st_uid=%lu, st_gid=%lu, ",
428 (unsigned long) statbuf.st_nlink,
429 (unsigned long) statbuf.st_uid,
430 (unsigned long) statbuf.st_gid);
431 tprintf("st_blksize=%lu, ", (unsigned long) statbuf.st_blksize);
432 tprintf("st_blocks=%lu, ", (unsigned long) statbuf.st_blocks);
435 tprintf("{st_mode=%s, ", sprintmode(statbuf.st_mode));
436 switch (statbuf.st_mode & S_IFMT) {
437 case S_IFCHR: case S_IFBLK:
438 tprintf("st_rdev=makedev(%lu, %lu), ",
439 (unsigned long) ((statbuf.st_rdev >> 18) & 0x3fff),
440 (unsigned long) (statbuf.st_rdev & 0x3ffff));
443 tprintf("st_size=%u, ", statbuf.st_size);
447 tprintf("st_atime=%s, ", sprinttime(statbuf.st_atime));
448 tprintf("st_mtime=%s, ", sprinttime(statbuf.st_mtime));
449 tprintf("st_ctime=%s}", sprinttime(statbuf.st_ctime));
457 /* Get the kernel's idea of struct stat. */
458 #define stat kernel_stat
459 #include <asm/stat.h>
462 #define kernel_stat stat
470 struct kernel_stat statbuf;
473 if (current_personality == 1) {
474 printstatsol(tcp, addr);
477 #endif /* LINUXSPARC */
483 if (syserror(tcp) || !verbose(tcp)) {
484 tprintf("%#x", addr);
487 if (umove(tcp, addr, &statbuf) < 0) {
492 tprintf("{st_dev=makedev(%lu, %lu), st_ino=%lu, st_mode=%s, ",
493 (unsigned long) major(statbuf.st_dev),
494 (unsigned long) minor(statbuf.st_dev),
495 (unsigned long) statbuf.st_ino,
496 sprintmode(statbuf.st_mode));
497 tprintf("st_nlink=%lu, st_uid=%lu, st_gid=%lu, ",
498 (unsigned long) statbuf.st_nlink,
499 (unsigned long) statbuf.st_uid,
500 (unsigned long) statbuf.st_gid);
501 #ifdef HAVE_ST_BLKSIZE
502 tprintf("st_blksize=%lu, ", (unsigned long) statbuf.st_blksize);
503 #endif /* HAVE_ST_BLKSIZE */
504 #ifdef HAVE_ST_BLOCKS
505 tprintf("st_blocks=%lu, ", (unsigned long) statbuf.st_blocks);
506 #endif /* HAVE_ST_BLOCKS */
509 tprintf("{st_mode=%s, ", sprintmode(statbuf.st_mode));
510 switch (statbuf.st_mode & S_IFMT) {
511 case S_IFCHR: case S_IFBLK:
513 tprintf("st_rdev=makedev(%lu, %lu), ",
514 (unsigned long) major(statbuf.st_rdev),
515 (unsigned long) minor(statbuf.st_rdev));
516 #else /* !HAVE_ST_RDEV */
517 tprintf("st_size=makedev(%lu, %lu), ",
518 (unsigned long) major(statbuf.st_size),
519 (unsigned long) minor(statbuf.st_size));
520 #endif /* !HAVE_ST_RDEV */
523 tprintf("st_size=%lu, ", statbuf.st_size);
527 tprintf("st_atime=%s, ", sprinttime(statbuf.st_atime));
528 tprintf("st_mtime=%s, ", sprinttime(statbuf.st_mtime));
529 tprintf("st_ctime=%s}", sprinttime(statbuf.st_ctime));
540 printpath(tcp, tcp->u_arg[0]);
543 printstat(tcp, tcp->u_arg[1]);
553 tprintf("%ld, ", tcp->u_arg[0]);
555 printstat(tcp, tcp->u_arg[1]);
565 printpath(tcp, tcp->u_arg[0]);
568 printstat(tcp, tcp->u_arg[1]);
573 #if defined(SVR4) || defined(LINUXSPARC)
580 tprintf("%ld, ", tcp->u_arg[0]);
581 printpath(tcp, tcp->u_arg[1]);
584 printstat(tcp, tcp->u_arg[2]);
594 tprintf("%ld, %ld, ", tcp->u_arg[0], tcp->u_arg[1]);
596 printstat(tcp, tcp->u_arg[2]);
606 tprintf("%ld, ", tcp->u_arg[0]);
607 printpath(tcp, tcp->u_arg[1]);
610 printstat(tcp, tcp->u_arg[2]);
619 int mode = tcp->u_arg[2];
622 tprintf("%ld, ", tcp->u_arg[0]);
623 printpath(tcp, tcp->u_arg[1]);
624 tprintf(", %s", sprintmode(mode));
625 switch (mode & S_IFMT) {
626 case S_IFCHR: case S_IFBLK:
628 tprintf(", makedev(%lu, %lu)",
629 (unsigned long) ((tcp->u_arg[3] >> 18) & 0x3fff),
630 (unsigned long) (tcp->u_arg[3] & 0x3ffff));
632 tprintf(", makedev(%lu, %lu)",
633 (unsigned long) major(tcp->u_arg[3]),
634 (unsigned long) minor(tcp->u_arg[3]));
644 #endif /* SVR4 || LINUXSPARC */
648 static struct xlat fsmagic[] = {
649 { 0xef51, "EXT2_OLD_SUPER_MAGIC" },
650 { 0xef53, "EXT2_SUPER_MAGIC" },
651 { 0x137d, "EXT_SUPER_MAGIC" },
652 { 0x9660, "ISOFS_SUPER_MAGIC" },
653 { 0x137f, "MINIX_SUPER_MAGIC" },
654 { 0x138f, "MINIX_SUPER_MAGIC2" },
655 { 0x2468, "NEW_MINIX_SUPER_MAGIC" },
656 { 0x4d44, "MSDOS_SUPER_MAGIC" },
657 { 0x6969, "NFS_SUPER_MAGIC" },
658 { 0x9fa0, "PROC_SUPER_MAGIC" },
659 { 0x012fd16d, "XIAFS_SUPER_MAGIC" },
675 s = xlookup(fsmagic, magic);
677 sprintf(buf, "\"%s\"", s);
681 sprintf(buf, "%#x", magic);
686 printstatfs(tcp, addr)
690 struct statfs statbuf;
692 if (syserror(tcp) || !verbose(tcp)) {
693 tprintf("%#lx", addr);
696 if (umove(tcp, addr, &statbuf) < 0) {
702 tprintf("{f_type=%s, f_fbsize=%u, f_blocks=%u, f_bfree=%u, ",
703 sprintfstype(statbuf.f_type),
704 statbuf.f_bsize, statbuf.f_blocks, statbuf.f_bfree);
705 tprintf("f_bavail=%u, f_files=%u, f_ffree=%u, f_namelen=%u}",
706 statbuf.f_bavail,statbuf.f_files, statbuf.f_ffree, statbuf.f_namelen);
708 tprintf("{f_type=%s, f_bsize=%lu, f_blocks=%lu, f_bfree=%lu, ",
709 sprintfstype(statbuf.f_type),
710 (unsigned long)statbuf.f_bsize,
711 (unsigned long)statbuf.f_blocks,
712 (unsigned long)statbuf.f_bfree);
713 tprintf("f_files=%lu, f_ffree=%lu",
714 (unsigned long)statbuf.f_files,
715 (unsigned long)statbuf.f_ffree);
717 tprintf(", f_namelen=%lu}", (unsigned long)statbuf.f_namelen);
728 printpath(tcp, tcp->u_arg[0]);
731 printstatfs(tcp, tcp->u_arg[1]);
741 tprintf("%lu, ", tcp->u_arg[0]);
743 printstatfs(tcp, tcp->u_arg[1]);
756 printpath(tcp, tcp->u_arg[0]);
759 printstatfs(tcp, tcp->u_arg[1]);
760 tprintf(", %lu", tcp->u_arg[2]);
770 tprintf("%lu, ", tcp->u_arg[0]);
772 printstatfs(tcp, tcp->u_arg[1]);
773 tprintf(", %lu", tcp->u_arg[2]);
788 struct ustat statbuf;
791 tprintf("makedev(%lu, %lu), ",
792 (long) major(tcp->u_arg[0]),
793 (long) minor(tcp->u_arg[0]));
796 if (syserror(tcp) || !verbose(tcp))
797 tprintf("%#lx", tcp->u_arg[1]);
798 else if (umove(tcp, tcp->u_arg[1], &statbuf) < 0)
801 tprintf("{f_tfree=%lu, f_tinode=%lu, ",
802 statbuf.f_tfree, statbuf.f_tinode);
803 tprintf("f_fname=\"%.*s\", ",
804 (int) sizeof(statbuf.f_fname),
806 tprintf("f_fpack=\"%.*s\"}",
807 (int) sizeof(statbuf.f_fpack),
822 printpath(tcp, tcp->u_arg[0]);
832 printpath(tcp, tcp->u_arg[0]);
833 tprintf(", %#lo", tcp->u_arg[1]);
843 printpath(tcp, tcp->u_arg[0]);
853 tprintf("%ld", tcp->u_arg[0]);
863 printpath(tcp, tcp->u_arg[0]);
873 tprintf("%ld", tcp->u_arg[0]);
883 printpath(tcp, tcp->u_arg[0]);
885 printpath(tcp, tcp->u_arg[1]);
895 printpath(tcp, tcp->u_arg[0]);
905 printpath(tcp, tcp->u_arg[0]);
907 printpath(tcp, tcp->u_arg[1]);
917 printpath(tcp, tcp->u_arg[0]);
921 tprintf("%#lx", tcp->u_arg[1]);
923 printpathn(tcp, tcp->u_arg[1], tcp->u_rval);
924 tprintf(", %lu", tcp->u_arg[2]);
934 printpath(tcp, tcp->u_arg[0]);
936 printpath(tcp, tcp->u_arg[1]);
946 printpath(tcp, tcp->u_arg[0]);
947 tprintf(", %lu, %lu", tcp->u_arg[1], tcp->u_arg[2]);
957 tprintf("%ld, %lu, %lu",
958 tcp->u_arg[0], tcp->u_arg[1], tcp->u_arg[2]);
968 printpath(tcp, tcp->u_arg[0]);
969 tprintf(", %#lo", tcp->u_arg[1]);
979 tprintf("%ld, %#lo", tcp->u_arg[0], tcp->u_arg[1]);
989 printpath(tcp, tcp->u_arg[0]);
991 printtv(tcp, tcp->u_arg[1]);
1002 if (entering(tcp)) {
1003 printpath(tcp, tcp->u_arg[0]);
1007 else if (!verbose(tcp))
1008 tprintf("%#lx", tcp->u_arg[1]);
1009 else if (umoven(tcp, tcp->u_arg[1], sizeof ut,
1013 tprintf("[%s,", sprinttime(ut[0]));
1014 tprintf(" %s]", sprinttime(ut[1]));
1024 int mode = tcp->u_arg[1];
1026 if (entering(tcp)) {
1027 printpath(tcp, tcp->u_arg[0]);
1028 tprintf(", %s", sprintmode(mode));
1029 switch (mode & S_IFMT) {
1030 case S_IFCHR: case S_IFBLK:
1032 if (current_personality == 1)
1033 tprintf(", makedev(%lu, %lu)",
1034 (unsigned long) ((tcp->u_arg[2] >> 18) & 0x3fff),
1035 (unsigned long) (tcp->u_arg[2] & 0x3ffff));
1038 tprintf(", makedev(%lu, %lu)",
1039 (unsigned long) major(tcp->u_arg[2]),
1040 (unsigned long) minor(tcp->u_arg[2]));
1053 if (entering(tcp)) {
1054 printpath(tcp, tcp->u_arg[0]);
1055 tprintf(", %#lo", tcp->u_arg[1]);
1064 if (entering(tcp)) {
1065 tprintf("%ld", tcp->u_arg[0]);
1079 if (!verbose(tcp)) {
1080 tprintf("%#lx", addr);
1083 if (umove(tcp, addr, &d) < 0) {
1087 tprintf("{d_ino=%ld, ", (unsigned long) d.d_ino);
1089 /* This contains garbage under Linux. */
1090 tprintf("d_off=%d, ", d.d_off);
1093 /* No point in printing this out since the syscall returns it. */
1094 tprintf("d_reclen=%u, ", d.d_reclen);
1097 printpathn(tcp, (long) ((struct dirent *) addr)->d_name, d.d_reclen);
1105 if (entering(tcp)) {
1106 tprintf("%lu, ", tcp->u_arg[0]);
1108 if (syserror(tcp) || tcp->u_rval == 0 || !verbose(tcp))
1109 tprintf("%#lx", tcp->u_arg[1]);
1111 printdir(tcp, tcp->u_arg[1]);
1112 /* Not much point in printing this out, it is always 1. */
1113 if (tcp->u_arg[2] != 1)
1114 tprintf(", %lu", tcp->u_arg[2]);
1125 int i, len, dents = 0;
1128 if (entering(tcp)) {
1129 tprintf("%lu, ", tcp->u_arg[0]);
1132 if (syserror(tcp) || !verbose(tcp)) {
1133 tprintf("%#lx, %lu", tcp->u_arg[1], tcp->u_arg[2]);
1138 tprintf (" = Unknown value\n");
1143 if ((buf = malloc(len)) == NULL) {
1144 tprintf("out of memory\n");
1147 if (umoven(tcp, tcp->u_arg[1], len, buf) < 0) {
1148 tprintf("{...}, %lu", tcp->u_arg[2]);
1154 for (i = 0; i < len;) {
1155 struct dirent *d = (struct dirent *) &buf[i];
1158 tprintf("%s{d_ino=%lu, d_off=%lu, ",
1159 i ? " " : "", d->d_ino, d->d_off);
1160 tprintf("d_reclen=%u, d_name=\"%s\"}",
1161 d->d_reclen, d->d_name);
1166 tprintf("%s{d_ino=%lu, d_off=%lu, ",
1167 i ? " " : "", d->d_ino, d->d_off);
1168 tprintf("d_reclen=%u, d_name=\"%s\"}",
1169 d->d_reclen, d->d_name);
1174 tprintf("%s{d_off=%lu, d_fileno=%lu, d_reclen=%u, ",
1175 i ? " " : "", d->d_off, d->d_fileno,
1177 tprintf("d_namlen=%u, d_name=\"%.*s\"}",
1178 d->d_namlen, d->d_namlen, d->d_name);
1187 tprintf("/* %u entries */", dents);
1188 tprintf(", %lu", tcp->u_arg[2]);
1201 tprintf("%#lx", tcp->u_arg[0]);
1203 printstr(tcp, tcp->u_arg[0], tcp->u_arg[1]);
1204 tprintf(", %lu", tcp->u_arg[1]);
1210 #ifdef HAVE_SYS_ASYNCH_H
1216 struct aio_result_t res;
1218 if (entering(tcp)) {
1219 tprintf("%lu, ", tcp->u_arg[0]);
1222 tprintf("%#lx", tcp->u_arg[1]);
1224 printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]);
1225 tprintf(", %lu, %lu, ", tcp->u_arg[2], tcp->u_arg[3]);
1226 printxval(whence, tcp->u_arg[4], "L_???");
1227 if (syserror(tcp) || tcp->u_arg[5] == 0
1228 || umove(tcp, tcp->u_arg[5], &res) < 0)
1229 tprintf(", %#lx", tcp->u_arg[5]);
1231 tprintf(", {aio_return %d aio_errno %d}",
1232 res.aio_return, res.aio_errno);
1241 struct aio_result_t res;
1243 if (entering(tcp)) {
1244 tprintf("%lu, ", tcp->u_arg[0]);
1245 printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]);
1246 tprintf(", %lu, %lu, ", tcp->u_arg[2], tcp->u_arg[3]);
1247 printxval(whence, tcp->u_arg[4], "L_???");
1250 if (tcp->u_arg[5] == 0)
1252 else if (syserror(tcp)
1253 || umove(tcp, tcp->u_arg[5], &res) < 0)
1254 tprintf(", %#lx", tcp->u_arg[5]);
1256 tprintf(", {aio_return %d aio_errno %d}",
1257 res.aio_return, res.aio_errno);
1267 printtv(tcp, tcp->u_arg[0]);
1275 struct aio_result_t res;
1278 if (tcp->u_arg[0] == 0)
1280 else if (syserror(tcp)
1281 || umove(tcp, tcp->u_arg[0], &res) < 0)
1282 tprintf("%#lx", tcp->u_arg[0]);
1284 tprintf("{aio_return %d aio_errno %d}",
1285 res.aio_return, res.aio_errno);
1290 #endif /* HAVE_SYS_ASYNCH_H */