summaryrefslogtreecommitdiff
path: root/src/machine/machined-dbus.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-12-25 03:19:19 +0100
committerLennart Poettering <lennart@poettering.net>2014-12-25 03:19:19 +0100
commit10f9c75519671e7c7ab8993b54fe22da7c2d0c38 (patch)
tree78777a123c0261f892af164581884f8a07756203 /src/machine/machined-dbus.c
parent5fa89b2cb366d533e56a9b7a9ce548480776f973 (diff)
machined: beef up machined image listing with creation/modification times of subvolumes
We make use of the btrfs subvol crtime for this, and for gpt images of a manually managed xattr, if we can.
Diffstat (limited to 'src/machine/machined-dbus.c')
-rw-r--r--src/machine/machined-dbus.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/machine/machined-dbus.c b/src/machine/machined-dbus.c
index 0bf97e1ebb..e264dacbe6 100644
--- a/src/machine/machined-dbus.c
+++ b/src/machine/machined-dbus.c
@@ -488,7 +488,7 @@ static int method_list_images(sd_bus *bus, sd_bus_message *message, void *userda
if (r < 0)
return r;
- r = sd_bus_message_open_container(reply, 'a', "(ssbo)");
+ r = sd_bus_message_open_container(reply, 'a', "(ssbtto)");
if (r < 0)
return r;
@@ -499,10 +499,12 @@ static int method_list_images(sd_bus *bus, sd_bus_message *message, void *userda
if (!p)
return -ENOMEM;
- r = sd_bus_message_append(reply, "(ssbo)",
+ r = sd_bus_message_append(reply, "(ssbtto)",
image->name,
image_type_to_string(image->type),
image->read_only,
+ image->crtime,
+ image->mtime,
p);
if (r < 0)
return r;
@@ -563,7 +565,7 @@ const sd_bus_vtable manager_vtable[] = {
SD_BUS_METHOD("GetImage", "s", "o", method_get_image, SD_BUS_VTABLE_UNPRIVILEGED),
SD_BUS_METHOD("GetMachineByPID", "u", "o", method_get_machine_by_pid, SD_BUS_VTABLE_UNPRIVILEGED),
SD_BUS_METHOD("ListMachines", NULL, "a(ssso)", method_list_machines, SD_BUS_VTABLE_UNPRIVILEGED),
- SD_BUS_METHOD("ListImages", NULL, "a(ssbo)", method_list_images, SD_BUS_VTABLE_UNPRIVILEGED),
+ SD_BUS_METHOD("ListImages", NULL, "a(ssbtto)", method_list_images, SD_BUS_VTABLE_UNPRIVILEGED),
SD_BUS_METHOD("CreateMachine", "sayssusa(sv)", "o", method_create_machine, 0),
SD_BUS_METHOD("CreateMachineWithNetwork", "sayssusaia(sv)", "o", method_create_machine_with_network, 0),
SD_BUS_METHOD("RegisterMachine", "sayssus", "o", method_register_machine, 0),