aboutgitcodelistschat:MatrixIRC
path: root/cooker/gluten.c
diff options
context:
space:
mode:
authorAlice Frosi <afrosi@redhat.com>2023-08-29 11:50:00 +0200
committerAlice Frosi <afrosi@redhat.com>2023-08-30 10:48:59 +0200
commitd3917582873df723aa2a3ddbb6116950292e114c (patch)
tree778089680e396cf9bf86c201476952f0870e93de /cooker/gluten.c
parent0e8806838763655f5f35822e19a20cb21e8d4747 (diff)
downloadseitan-d3917582873df723aa2a3ddbb6116950292e114c.tar
seitan-d3917582873df723aa2a3ddbb6116950292e114c.tar.gz
seitan-d3917582873df723aa2a3ddbb6116950292e114c.tar.bz2
seitan-d3917582873df723aa2a3ddbb6116950292e114c.tar.lz
seitan-d3917582873df723aa2a3ddbb6116950292e114c.tar.xz
seitan-d3917582873df723aa2a3ddbb6116950292e114c.tar.zst
seitan-d3917582873df723aa2a3ddbb6116950292e114c.zip
cooker: simplify tag and add caller metadata
Group the metadata information: - simplify the json by removing the 'tag' and only using 'get' and 'set' keys - get uid and gid at runtime for the target ('caller'). This can be useful when the the UID and GID of the target are only known at runtime and they need to be used for setting the permissions of files - updated example demo/mknod.hjson Signed-off-by: Alice Frosi <afrosi@redhat.com>
Diffstat (limited to 'cooker/gluten.c')
-rw-r--r--cooker/gluten.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/cooker/gluten.c b/cooker/gluten.c
index 4d3aea5..708c005 100644
--- a/cooker/gluten.c
+++ b/cooker/gluten.c
@@ -119,8 +119,10 @@ struct gluten_offset gluten_get_tag(struct gluten_ctx *g, const char *name)
int i;
for (i = 0; i < TAGS_MAX && g->tags[i].name; i++) {
- if (!strcmp(g->tags[i].name, name))
+ if (!strcmp(g->tags[i].name, name)) {
+ debug("XXX got tag for name:%s offset:%d", name, g->tags[i].offset);
return g->tags[i].offset;
+ }
}
die(" tag '%s' not found", name);