aboutgitcodelistschat:MatrixIRC
diff options
context:
space:
mode:
authorAlice Frosi <afrosi@redhat.com>2023-09-01 14:32:16 +0200
committerAlice Frosi <afrosi@redhat.com>2023-09-01 14:32:16 +0200
commit472d0e7212faed61bc6663f428f0d3c1c8ce507e (patch)
tree792fc2f848e99ff5f642acfdead0fca820fb85d5
parent13c82bafa232e476e96d225e6fdcb5bee0f394f0 (diff)
downloadseitan-472d0e7212faed61bc6663f428f0d3c1c8ce507e.tar
seitan-472d0e7212faed61bc6663f428f0d3c1c8ce507e.tar.gz
seitan-472d0e7212faed61bc6663f428f0d3c1c8ce507e.tar.bz2
seitan-472d0e7212faed61bc6663f428f0d3c1c8ce507e.tar.lz
seitan-472d0e7212faed61bc6663f428f0d3c1c8ce507e.tar.xz
seitan-472d0e7212faed61bc6663f428f0d3c1c8ce507e.tar.zst
seitan-472d0e7212faed61bc6663f428f0d3c1c8ce507e.zip
cooker: fix priority name for sched_setscheduler
-rw-r--r--cooker/call.c13
-rw-r--r--cooker/calls/scheduler.c2
2 files changed, 9 insertions, 6 deletions
diff --git a/cooker/call.c b/cooker/call.c
index 9a94d58..a2dd734 100644
--- a/cooker/call.c
+++ b/cooker/call.c
@@ -160,20 +160,21 @@ static union value parse_field(struct gluten_ctx *g, struct arg *args,
JSON_Value *sel;
if (f->name)
- debug(" parsing field name %s", f->name);
+ debug(" parsing field name %s for json:%s ", f->name,
+ json_serialize_to_string(jvalue));
if (offset.type != OFFSET_NULL)
offset.offset += f->offset;
if (json_value_get_type(jvalue) == JSONObject &&
- (tmp1 = json_value_get_object(jvalue)) && is_metadata_obj(tmp1))
+ (tmp1 = json_value_get_object(jvalue)) && is_metadata_obj(tmp1)) {
v = parse_metadata(g, f, &base_offset, offset, tmp1, dry_run,
add);
- if (v.v_num == 0)
- return v;
+ if (v.v_num == 0)
+ return v;
+ }
if (!jvalue && !(f->flags & SIZE))
return v;
-
switch (f->type) {
case USHORT:
case INT:
@@ -248,6 +249,8 @@ static union value parse_field(struct gluten_ctx *g, struct arg *args,
tmp1 = json_value_get_object(jvalue);
f_value = json_object_get_value(tmp1, f_inner->name);
+ debug(" parse struct internal value:%s",
+ json_serialize_to_string(f_value));
if (!f_value)
continue;
parse_field(g, args, &struct_start, index, f_inner,
diff --git a/cooker/calls/scheduler.c b/cooker/calls/scheduler.c
index 436d3c2..b605604 100644
--- a/cooker/calls/scheduler.c
+++ b/cooker/calls/scheduler.c
@@ -20,7 +20,7 @@ static struct num sched_policy[] = {
};
static struct field sched_param[] = {
- { "sched_priority",
+ { "priority",
INT,
0,
offsetof(struct sched_param, sched_priority),