* Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
* Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
* Copyright (c) 1996-1999 Wichert Akkerman <wichert@cistron.nl>
+ * Copyright (c) 1999-2017 The strace developers.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
kernel_ulong_t iov_buf[2], len;
struct print_iovec_config *c = data;
- if (elem_size < sizeof(iov_buf)) {
+ if (elem_size < sizeof(iov_buf)) {
iov_buf[0] = ((unsigned int *) elem_buf)[0];
iov_buf[1] = ((unsigned int *) elem_buf)[1];
iov = iov_buf;
len = c->data_size;
if (c->data_size != (kernel_ulong_t) -1)
c->data_size -= len;
- decode_netlink(tcp, iov[0], len);
+ /* assume that the descriptor is 1st syscall argument */
+ decode_netlink(tcp, tcp->u_arg[0], iov[0], len);
break;
default:
printaddr(iov[0]);
const kernel_ulong_t data_size)
{
kernel_ulong_t iov[2];
- struct print_iovec_config config =
- { .decode_iov = decode_iov, .data_size = data_size };
+ struct print_iovec_config config = {
+ .decode_iov = decode_iov, .data_size = data_size
+ };
print_array(tcp, addr, len, iov, current_wordsize * 2,
umoven_or_printaddr_ignore_syserror, print_iovec, &config);