aboutgitcodelistschat:MatrixIRC
path: root/cooker/calls
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2023-06-04 09:51:15 +0200
committerStefano Brivio <sbrivio@redhat.com>2023-06-04 09:51:15 +0200
commitc021082abcc9d94c2e94679f6729265fe65529a3 (patch)
treee0c8d7160d9a725911edafc80ab0bceeec35e159 /cooker/calls
parent15c01cbd4b1fabe929cb93226f6295e88b0c04c4 (diff)
downloadseitan-c021082abcc9d94c2e94679f6729265fe65529a3.tar
seitan-c021082abcc9d94c2e94679f6729265fe65529a3.tar.gz
seitan-c021082abcc9d94c2e94679f6729265fe65529a3.tar.bz2
seitan-c021082abcc9d94c2e94679f6729265fe65529a3.tar.lz
seitan-c021082abcc9d94c2e94679f6729265fe65529a3.tar.xz
seitan-c021082abcc9d94c2e94679f6729265fe65529a3.tar.zst
seitan-c021082abcc9d94c2e94679f6729265fe65529a3.zip
cooker: Generic attributes and ATTR_SIZE
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'cooker/calls')
-rw-r--r--cooker/calls/ioctl.c6
-rw-r--r--cooker/calls/net.c12
2 files changed, 9 insertions, 9 deletions
diff --git a/cooker/calls/ioctl.c b/cooker/calls/ioctl.c
index c9f01d0..1609541 100644
--- a/cooker/calls/ioctl.c
+++ b/cooker/calls/ioctl.c
@@ -83,7 +83,7 @@ static struct field tun_ifr[] = { /* netdevice(7) */
};
static struct select_num ioctl_request_arg[] = {
- { FS_IOC_GETFLAGS,
+ { FS_IOC_GETFLAGS, -1,
{ 2,
{
"argp", INT, FLAGS,
@@ -92,7 +92,7 @@ static struct select_num ioctl_request_arg[] = {
}
}
},
- { FS_IOC_SETFLAGS,
+ { FS_IOC_SETFLAGS, -1,
{ 2,
{
"argp", INT, FLAGS,
@@ -101,7 +101,7 @@ static struct select_num ioctl_request_arg[] = {
}
}
},
- { TUNSETIFF,
+ { TUNSETIFF, -1,
{ 2,
{
"ifr", STRUCT, 0,
diff --git a/cooker/calls/net.c b/cooker/calls/net.c
index 746a08e..7231a0e 100644
--- a/cooker/calls/net.c
+++ b/cooker/calls/net.c
@@ -168,7 +168,7 @@ static struct field connect_family = {
};
static struct select_num connect_addr_select_family[] = {
- { AF_UNIX,
+ { AF_UNIX, sizeof(struct sockaddr_un),
{ 1,
{
NULL, STRUCT, 0, 0, 0,
@@ -176,7 +176,7 @@ static struct select_num connect_addr_select_family[] = {
}
}
},
- { AF_INET,
+ { AF_INET, sizeof(struct sockaddr_in),
{ 1,
{
NULL, STRUCT, 0, 0, 0,
@@ -184,7 +184,7 @@ static struct select_num connect_addr_select_family[] = {
}
}
},
- { AF_INET6,
+ { AF_INET6, sizeof(struct sockaddr_in6),
{ 1,
{
NULL, STRUCT, 0, 0, 0,
@@ -192,7 +192,7 @@ static struct select_num connect_addr_select_family[] = {
}
}
},
- { AF_NETLINK,
+ { AF_NETLINK, sizeof(struct sockaddr_nl),
{ 1,
{
NULL, STRUCT, 0, 0, 0,
@@ -228,7 +228,7 @@ static struct arg connect_args[] = {
{
"addr", SELECT, 0,
0,
- sizeof(struct sockaddr_un),
+ sizeof(struct sockaddr_storage),
{ .d_select = &connect_addr_select },
},
},
@@ -237,7 +237,7 @@ static struct arg connect_args[] = {
"addrlen", LONG, SIZE,
0,
0,
- { .d_arg_size = 1 },
+ { .d_size = (intptr_t)&connect_addr_select },
},
},
{ 0 }