aboutgitcodelistschat:MatrixIRC
path: root/cooker/calls/ioctl.c
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2023-06-01 11:04:38 +0200
committerStefano Brivio <sbrivio@redhat.com>2023-06-01 11:10:27 +0200
commit1644bbec6161ec971a2ba3c213ce285b995cac22 (patch)
tree75974577237f8ae1a0989755be0a953c631f794e /cooker/calls/ioctl.c
parentbb47d77d316137c9deddd46135b22dc144ae1ea9 (diff)
downloadseitan-1644bbec6161ec971a2ba3c213ce285b995cac22.tar
seitan-1644bbec6161ec971a2ba3c213ce285b995cac22.tar.gz
seitan-1644bbec6161ec971a2ba3c213ce285b995cac22.tar.bz2
seitan-1644bbec6161ec971a2ba3c213ce285b995cac22.tar.lz
seitan-1644bbec6161ec971a2ba3c213ce285b995cac22.tar.xz
seitan-1644bbec6161ec971a2ba3c213ce285b995cac22.tar.zst
seitan-1644bbec6161ec971a2ba3c213ce285b995cac22.zip
cooker: OP_CALL and OP_COPY stuff
...mostly. Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'cooker/calls/ioctl.c')
-rw-r--r--cooker/calls/ioctl.c72
1 files changed, 46 insertions, 26 deletions
diff --git a/cooker/calls/ioctl.c b/cooker/calls/ioctl.c
index 576e02e..a60b834 100644
--- a/cooker/calls/ioctl.c
+++ b/cooker/calls/ioctl.c
@@ -71,38 +71,50 @@ static struct num tun_ifr_flags[] = {
static struct field tun_ifr[] = { /* netdevice(7) */
{
- "name", STRING,
+ "name", STRING, 0,
offsetof(struct ifreq, ifr_name),
IFNAMSIZ, { 0 },
},
{
- "flags", INT, /* One allowed at a time? */
+ "flags", INT, /* One allowed at a time? */ 0,
offsetof(struct ifreq, ifr_flags),
0, { .d_num = tun_ifr_flags },
},
};
static struct select_num ioctl_request_arg[] = {
- {
- FS_IOC_GETFLAGS,
- { 2, "argp", INTFLAGS, sizeof(int), { .d_num = attr } }
+ { FS_IOC_GETFLAGS,
+ { 2,
+ {
+ "argp", INT, FLAGS,
+ sizeof(int), 0,
+ { .d_num = attr }
+ }
+ }
},
- {
- FS_IOC_SETFLAGS,
- { 2, "argp", INTFLAGS, sizeof(int), { .d_num = attr } }
+ { FS_IOC_SETFLAGS,
+ { 2,
+ {
+ "argp", INT, FLAGS,
+ sizeof(int), 0,
+ { .d_num = attr }
+ }
+ }
},
- {
- TUNSETIFF,
- {
- 2, "ifr", STRUCT, sizeof(struct ifreq),
- { .d_struct = tun_ifr }
+ { TUNSETIFF,
+ { 2,
+ {
+ "ifr", STRUCT, 0,
+ sizeof(struct ifreq), 0,
+ { .d_struct = tun_ifr }
+ }
}
},
{ 0 },
};
static struct field ioctl_request = {
- "request", INT, 0, 0, { .d_num = request },
+ "request", INT, 0, 0, 0, { .d_num = request },
};
static struct select ioctl_request_select = {
@@ -110,21 +122,29 @@ static struct select ioctl_request_select = {
};
static struct arg ioctl_args[] = {
- {
- 0, "path", FDPATH, 0,
- { 0 }
+ { 0,
+ {
+ "path", FDPATH, 0, 0, 0,
+ { 0 }
+ }
},
- {
- 0, "fd", INT, 0,
- { 0 }
+ { 0,
+ {
+ "fd", INT, 0, 0, 0,
+ { 0 }
+ }
},
- {
- 1, "request", SELECT, 0,
- { .d_select = &ioctl_request_select }
+ { 1,
+ {
+ "request", SELECT, 0, 0, 0,
+ { .d_select = &ioctl_request_select }
+ }
},
- {
- 2, "arg", SELECTED, -1,
- { 0 }
+ { 2,
+ {
+ "arg", SELECTED, 0, -1, 0,
+ { 0 }
+ }
},
{ 0 },
};