From b275a6299e8b1c2e2afcca02a5c333cd3ea60f09 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Sun, 12 Apr 2020 19:31:36 +0100 Subject: [PATCH] instance: harmonize instance API Move attributes in generated output to match their place in the expected input. Signed-off-by: Daniel Golle --- service/instance.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/service/instance.c b/service/instance.c index c941157..47d563c 100644 --- a/service/instance.c +++ b/service/instance.c @@ -1323,12 +1323,6 @@ void instance_dump(struct blob_buf *b, struct service_instance *in, int verbose) blobmsg_add_string(b, "name", in->jail.name); if (in->jail.hostname) blobmsg_add_string(b, "hostname", in->jail.hostname); - if (in->extroot) - blobmsg_add_string(b, "extroot", in->extroot); - if (in->overlaydir) - blobmsg_add_string(b, "overlaydir", in->overlaydir); - if (in->tmpoverlaysize) - blobmsg_add_string(b, "tmpoverlaysize", in->tmpoverlaysize); blobmsg_add_u8(b, "procfs", in->jail.procfs); blobmsg_add_u8(b, "sysfs", in->jail.sysfs); @@ -1348,6 +1342,13 @@ void instance_dump(struct blob_buf *b, struct service_instance *in, int verbose) } } + if (in->extroot) + blobmsg_add_string(b, "extroot", in->extroot); + if (in->overlaydir) + blobmsg_add_string(b, "overlaydir", in->overlaydir); + if (in->tmpoverlaysize) + blobmsg_add_string(b, "tmpoverlaysize", in->tmpoverlaysize); + if (verbose && in->trigger) blobmsg_add_blob(b, in->trigger); -- 2.25.1