aboutgitcodelistschat:MatrixIRC
path: root/cooker/call.c
diff options
context:
space:
mode:
Diffstat (limited to 'cooker/call.c')
-rw-r--r--cooker/call.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/cooker/call.c b/cooker/call.c
index dd37fe9..dbdc52b 100644
--- a/cooker/call.c
+++ b/cooker/call.c
@@ -72,7 +72,9 @@ static union value parse_metadata(struct gluten_ctx *g, struct field *f,
if (tag_offset.type == OFFSET_NULL)
die(" tag not found");
- if ((*base_offset)->type == OFFSET_NULL || (f->flags & WBUF)) {
+ if (f->flags & FD) {
+ emit_fdget(g, tag_offset, offset);
+ } else if ((*base_offset)->type == OFFSET_NULL || (f->flags & WBUF)) {
**base_offset = tag_offset;
} else if (f->flags & MASK || add) {
emit_bitwise(g, f->type, BITWISE_OR, offset, offset,
@@ -374,6 +376,7 @@ bool arg_needs_temp(struct field *f, int pos, JSON_Value *jvalue,
return false;
case FDPATH:
+ case FDMOUNT:
case STRING:
return false;
case STRUCT:
@@ -433,7 +436,8 @@ static void parse_call(struct gluten_ctx *g, struct context_desc *cdesc,
struct gluten_offset offset[6] = { 0 }, ret_offset = { 0 };
bool is_ptr[6] = { false };
/* Minimum requirements for argument specification:
- * - if argument can be FDPATH, exactly one value for that position
+ * - if argument can be FDPATH/FDMOUNT, exactly one value for that
+ * position
* - if argument is a size field, value is optional
* - otherwise, every argument needs to be specified
*/
@@ -459,7 +463,7 @@ static void parse_call(struct gluten_ctx *g, struct context_desc *cdesc,
arg_check[a->pos].multi_field = true;
arg_check[a->pos].found = true;
- if (a->f.type == FDPATH)
+ if (a->f.type == FDPATH || a->f.type == FDMOUNT)
arg_check[a->pos].needs_fd = true;
if (a->f.size)