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.
42 tprintf("%ld, ", tcp->u_arg[0]);
45 tprintf("%#lx", tcp->u_arg[1]);
47 printstr(tcp, tcp->u_arg[1], tcp->u_rval);
48 tprintf(", %lu", tcp->u_arg[2]);
58 tprintf("%ld, ", tcp->u_arg[0]);
59 printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]);
60 tprintf(", %lu", tcp->u_arg[2]);
73 tprintf("%ld, ", tcp->u_arg[0]);
77 tcp->u_arg[1], tcp->u_arg[2]);
81 if ((iov = (struct iovec *) malloc(len * sizeof *iov)) == NULL) {
82 fprintf(stderr, "No memory");
85 if (umoven(tcp, tcp->u_arg[1],
86 len * sizeof *iov, (char *) iov) < 0) {
87 tprintf("%#lx", tcp->u_arg[1]);
90 for (i = 0; i < len; i++) {
94 printstr(tcp, (long) iov[i].iov_base,
96 tprintf(", %lu}", (unsigned long)iov[i].iov_len);
101 tprintf(", %lu", tcp->u_arg[2]);
114 tprintf("%ld, ", tcp->u_arg[0]);
116 iov = (struct iovec *) malloc(len * sizeof *iov);
118 fprintf(stderr, "No memory");
121 if (umoven(tcp, tcp->u_arg[1],
122 len * sizeof *iov, (char *) iov) < 0) {
123 tprintf("%#lx", tcp->u_arg[1]);
126 for (i = 0; i < len; i++) {
130 printstr(tcp, (long) iov[i].iov_base,
132 tprintf(", %lu}", (unsigned long)iov[i].iov_len);
137 tprintf(", %lu", tcp->u_arg[2]);
149 tprintf("%ld, ", tcp->u_arg[0]);
152 tprintf("%#lx", tcp->u_arg[1]);
154 printstr(tcp, tcp->u_arg[1], tcp->u_rval);
156 /* off_t is signed int */
157 tprintf(", %lu, %ld", tcp->u_arg[2], tcp->u_arg[3]);
159 tprintf(", %lu, %llu", tcp->u_arg[2],
160 (((unsigned long long) tcp->u_arg[4]) << 32
172 tprintf("%ld, ", tcp->u_arg[0]);
173 printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]);
175 /* off_t is signed int */
176 tprintf(", %lu, %ld", tcp->u_arg[2], tcp->u_arg[3]);
178 tprintf(", %lu, %llu", tcp->u_arg[2],
179 (((unsigned long long) tcp->u_arg[4]) << 32
193 tprintf("%ld, ", tcp->u_arg[0]);
196 tprintf("%#lx", tcp->u_arg[1]);
198 printstr(tcp, tcp->u_arg[1], tcp->u_rval);
199 tprintf(", %lu, %llu", tcp->u_arg[2],
200 *(unsigned long long *)&tcp->u_arg[3]);
210 tprintf("%ld, ", tcp->u_arg[0]);
211 printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]);
212 tprintf(", %lu, %llu", tcp->u_arg[2],
213 *(unsigned long long *)&tcp->u_arg[3]);
225 tprintf("%ld, %ld, ", tcp->u_arg[0], tcp->u_arg[1]);
228 else if (umove(tcp, tcp->u_arg[2], &offset) < 0)
229 tprintf("%#lx", tcp->u_arg[2]);
231 tprintf("[%lu]", offset);
232 tprintf(", %lu", tcp->u_arg[3]);
246 tprintf("%ld, ", tcp->u_arg[0]);
247 symbol = ioctl_lookup(tcp->u_arg[1]);
249 tprintf("%s", symbol);
251 tprintf("%#lx", tcp->u_arg[1]);
252 ioctl_decode(tcp, tcp->u_arg[1], tcp->u_arg[2]);
255 if (ioctl_decode(tcp, tcp->u_arg[1], tcp->u_arg[2]) == 0)
256 tprintf(", %#lx", tcp->u_arg[2]);