instance: harmonize instance API
authorDaniel Golle <daniel@makrotopia.org>
Sun, 12 Apr 2020 18:31:36 +0000 (19:31 +0100)
committerDaniel Golle <daniel@makrotopia.org>
Sun, 12 Apr 2020 18:51:50 +0000 (19:51 +0100)
Move attributes in generated output to match their place in the
expected input.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
service/instance.c

index c941157eda457503c58ff1f635b4f18403915f05..47d563cf9c0ebf27fc36a9ae2c1953d296ace9d8 100644 (file)
@@ -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);