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>
5 * Copyright (c) 1996-1999 Wichert Akkerman <wichert@cistron.nl>
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
16 * 3. The name of the author may not be used to endorse or promote products
17 * derived from this software without specific prior written permission.
19 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
20 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
21 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
23 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
43 tprintf("%ld, ", tcp->u_arg[0]);
46 tprintf("%#lx", tcp->u_arg[1]);
48 printstr(tcp, tcp->u_arg[1], tcp->u_rval);
49 tprintf(", %lu", tcp->u_arg[2]);
59 tprintf("%ld, ", tcp->u_arg[0]);
60 printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]);
61 tprintf(", %lu", tcp->u_arg[2]);
74 tprintf("%ld, ", tcp->u_arg[0]);
78 tcp->u_arg[1], tcp->u_arg[2]);
82 if ((iov = (struct iovec *) malloc(len * sizeof *iov)) == NULL) {
83 fprintf(stderr, "No memory");
86 if (umoven(tcp, tcp->u_arg[1],
87 len * sizeof *iov, (char *) iov) < 0) {
88 tprintf("%#lx", tcp->u_arg[1]);
91 for (i = 0; i < len; i++) {
95 printstr(tcp, (long) iov[i].iov_base,
97 tprintf(", %lu}", (unsigned long)iov[i].iov_len);
102 tprintf(", %lu", tcp->u_arg[2]);
115 tprintf("%ld, ", tcp->u_arg[0]);
117 iov = (struct iovec *) malloc(len * sizeof *iov);
119 fprintf(stderr, "No memory");
122 if (umoven(tcp, tcp->u_arg[1],
123 len * sizeof *iov, (char *) iov) < 0) {
124 tprintf("%#lx", tcp->u_arg[1]);
127 for (i = 0; i < len; i++) {
131 printstr(tcp, (long) iov[i].iov_base,
133 tprintf(", %lu}", (unsigned long)iov[i].iov_len);
138 tprintf(", %lu", tcp->u_arg[2]);
150 tprintf("%ld, ", tcp->u_arg[0]);
153 tprintf("%#lx", tcp->u_arg[1]);
155 printstr(tcp, tcp->u_arg[1], tcp->u_rval);
157 /* off_t is signed int */
158 tprintf(", %lu, %ld", tcp->u_arg[2], tcp->u_arg[3]);
160 tprintf(", %lu, %llu", tcp->u_arg[2],
161 (((unsigned long long) tcp->u_arg[4]) << 32
173 tprintf("%ld, ", tcp->u_arg[0]);
174 printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]);
176 /* off_t is signed int */
177 tprintf(", %lu, %ld", tcp->u_arg[2], tcp->u_arg[3]);
179 tprintf(", %lu, %llu", tcp->u_arg[2],
180 (((unsigned long long) tcp->u_arg[4]) << 32
194 tprintf("%ld, ", tcp->u_arg[0]);
197 tprintf("%#lx", tcp->u_arg[1]);
199 printstr(tcp, tcp->u_arg[1], tcp->u_rval);
200 tprintf(", %lu, %llu", tcp->u_arg[2],
201 *(unsigned long long *)&tcp->u_arg[3]);
211 tprintf("%ld, ", tcp->u_arg[0]);
212 printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]);
213 tprintf(", %lu, %llu", tcp->u_arg[2],
214 *(unsigned long long *)&tcp->u_arg[3]);
226 tprintf("%ld, %ld, ", tcp->u_arg[0], tcp->u_arg[1]);
229 else if (umove(tcp, tcp->u_arg[2], &offset) < 0)
230 tprintf("%#lx", tcp->u_arg[2]);
232 tprintf("[%lu]", offset);
233 tprintf(", %lu", tcp->u_arg[3]);
247 tprintf("%ld, ", tcp->u_arg[0]);
248 symbol = ioctl_lookup(tcp->u_arg[1]);
250 tprintf("%s", symbol);
252 tprintf("%#lx", tcp->u_arg[1]);
253 ioctl_decode(tcp, tcp->u_arg[1], tcp->u_arg[2]);
256 if (ioctl_decode(tcp, tcp->u_arg[1], tcp->u_arg[2]) == 0)
257 tprintf(", %#lx", tcp->u_arg[2]);