aboutgitcodelistschat:MatrixIRC
path: root/cooker/calls
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2023-06-06 11:56:21 +0200
committerStefano Brivio <sbrivio@redhat.com>2023-06-06 11:56:21 +0200
commite5a1983e4384a44e45486fb9a48bdba375a529b6 (patch)
tree6e84d9e43245b2d2c6aa2a6312b6281d744a7d24 /cooker/calls
parent9c371d77e843163261d28e374f4ea7dab2e3f64d (diff)
downloadseitan-e5a1983e4384a44e45486fb9a48bdba375a529b6.tar
seitan-e5a1983e4384a44e45486fb9a48bdba375a529b6.tar.gz
seitan-e5a1983e4384a44e45486fb9a48bdba375a529b6.tar.bz2
seitan-e5a1983e4384a44e45486fb9a48bdba375a529b6.tar.lz
seitan-e5a1983e4384a44e45486fb9a48bdba375a529b6.tar.xz
seitan-e5a1983e4384a44e45486fb9a48bdba375a529b6.tar.zst
seitan-e5a1983e4384a44e45486fb9a48bdba375a529b6.zip
cooker: Draft quality: mknod/mknodat, sets of values with "in"
While at it: - directly assign 'fd' in eater from install_filter() - turn op_cmp into a description-style thing Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'cooker/calls')
-rw-r--r--cooker/calls/fs.c48
1 files changed, 44 insertions, 4 deletions
diff --git a/cooker/calls/fs.c b/cooker/calls/fs.c
index 013dacf..cfc0091 100644
--- a/cooker/calls/fs.c
+++ b/cooker/calls/fs.c
@@ -69,27 +69,66 @@ static struct arg mknod_args[] = {
{ 0,
{
"path", STRING, 0,
- 0, 1 /* TODO: PATH_MAX */,
+ 0, PATH_MAX,
{ 0 }
}
},
{ 1,
{
- "mode", UNDEF /* TODO */, FLAGS,
+ "mode", U32 /* TODO */, 0,
0, 0,
{ 0 /* TODO */ },
}
},
{ 2,
{
- "major", UNDEF /* TODO */, 0,
+ "major", GNU_DEV_MAJOR, 0,
0, 0,
{ 0 },
}
},
{ 2,
{
- "minor", UNDEF /* TODO */, 0,
+ "minor", GNU_DEV_MINOR, 0,
+ 0, 0,
+ { 0 },
+ }
+ },
+ { 0 }
+};
+
+static struct arg mknodat_args[] = {
+ { 0,
+ {
+ "dirfd", UNDEF, 0,
+ 0, 1 /* TODO: PATH_MAX */,
+ { 0 }
+ }
+ },
+ { 1,
+ {
+ "path", STRING, 0,
+ 0, PATH_MAX,
+ { 0 }
+ }
+ },
+ { 2,
+ {
+ "mode", UNDEF /* TODO */, FLAGS,
+ 0, 0,
+ { 0 /* TODO */ },
+ }
+ },
+ { 3,
+ {
+ "major", GNU_DEV_MAJOR, 0,
+ 0, 0,
+ { 0 },
+ }
+ },
+ { 3,
+ {
+ "minor", GNU_DEV_MINOR, 0,
0, 0,
{ 0 },
}
@@ -99,5 +138,6 @@ static struct arg mknod_args[] = {
struct call syscalls_fs[] = {
{ __NR_mknod, "mknod", mknod_args },
+ { __NR_mknodat, "mknodat", mknodat_args },
{ 0 },
};