aboutgitcodelistschat:MatrixIRC
path: root/cooker/cooker.h
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/cooker.h
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/cooker.h')
-rw-r--r--cooker/cooker.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/cooker/cooker.h b/cooker/cooker.h
index c59a5dc..40277c2 100644
--- a/cooker/cooker.h
+++ b/cooker/cooker.h
@@ -20,6 +20,7 @@
#include <util.h>
#define TAGS_MAX 256
+#define ATTRS_MAX 256
#define CALL_ARGS 6
struct num;
@@ -38,7 +39,7 @@ union desc {
struct num *d_num;
struct field *d_struct;
struct select *d_select;
- int d_arg_size;
+ intptr_t d_size;
};
/**
@@ -152,10 +153,12 @@ struct arg {
/**
* struct select_num - List of possible selections based on numeric selector
* @value: Numeric value of the selector
+ * @sel_size: Size associated with selection (not necessarily argument size)
* @target: Argument description defined by this selector
*/
struct select_num {
long long value;
+ ssize_t sel_size;
struct arg target;
};
@@ -172,4 +175,20 @@ struct select {
} desc;
};
+enum attr_type {
+ ATTR_NONE = 0,
+ ATTR_SIZE,
+};
+
+/**
+ * struct attr - Generic attribute for syscall model with link
+ * @id: Link
+ * @v: Attribute value
+ */
+struct attr {
+ enum attr_type type;
+ intptr_t id;
+ union value v;
+};
+
#endif /* COOKER_H */