summaryrefslogtreecommitdiff
path: root/src/machine
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-12-22 02:24:05 +0100
committerLennart Poettering <lennart@poettering.net>2013-12-22 03:50:52 +0100
commit556089dc57b10a12a03edd3d3e90ca17398ad206 (patch)
treecaeaa4e7a0c3d22cf1c0ffaa257403112558ae9c /src/machine
parentdf98a87ba389bdfc0359beedf47557411f3af434 (diff)
bus: decorate the various object vtables with SD_BUS_VTABLE_PROPERTY_CONST where appropriate
Diffstat (limited to 'src/machine')
-rw-r--r--src/machine/machine-dbus.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c
index 1f24b11197..90eb001bb1 100644
--- a/src/machine/machine-dbus.c
+++ b/src/machine/machine-dbus.c
@@ -21,6 +21,7 @@
#include <errno.h>
#include <string.h>
+#include <sys/capability.h>
#include "bus-util.h"
#include "strv.h"
@@ -127,18 +128,17 @@ static int method_kill(sd_bus *bus, sd_bus_message *message, void *userdata, sd_
const sd_bus_vtable machine_vtable[] = {
SD_BUS_VTABLE_START(0),
- SD_BUS_PROPERTY("Name", "s", NULL, offsetof(Machine, name), 0),
- SD_BUS_PROPERTY("Id", "ay", property_get_id, 0, 0),
- SD_BUS_PROPERTY("Timestamp", "t", NULL, offsetof(Machine, timestamp.realtime), 0),
- SD_BUS_PROPERTY("TimestampMonotonic", "t", NULL, offsetof(Machine, timestamp.monotonic), 0),
- SD_BUS_PROPERTY("Service", "s", NULL, offsetof(Machine, service), 0),
- SD_BUS_PROPERTY("Scope", "s", NULL, offsetof(Machine, scope), 0),
- SD_BUS_PROPERTY("Leader", "u", NULL, offsetof(Machine, leader), 0),
- SD_BUS_PROPERTY("Class", "s", property_get_class, offsetof(Machine, class), 0),
+ SD_BUS_PROPERTY("Name", "s", NULL, offsetof(Machine, name), SD_BUS_VTABLE_PROPERTY_CONST),
+ SD_BUS_PROPERTY("Id", "ay", property_get_id, 0, SD_BUS_VTABLE_PROPERTY_CONST),
+ BUS_PROPERTY_DUAL_TIMESTAMP("Timestamp", offsetof(Machine, timestamp), SD_BUS_VTABLE_PROPERTY_CONST),
+ SD_BUS_PROPERTY("Service", "s", NULL, offsetof(Machine, service), SD_BUS_VTABLE_PROPERTY_CONST),
+ SD_BUS_PROPERTY("Scope", "s", NULL, offsetof(Machine, scope), SD_BUS_VTABLE_PROPERTY_CONST),
+ SD_BUS_PROPERTY("Leader", "u", NULL, offsetof(Machine, leader), SD_BUS_VTABLE_PROPERTY_CONST),
+ SD_BUS_PROPERTY("Class", "s", property_get_class, offsetof(Machine, class), SD_BUS_VTABLE_PROPERTY_CONST),
+ SD_BUS_PROPERTY("RootDirectory", "s", NULL, offsetof(Machine, root_directory), SD_BUS_VTABLE_PROPERTY_CONST),
SD_BUS_PROPERTY("State", "s", property_get_state, 0, 0),
- SD_BUS_PROPERTY("RootDirectory", "s", NULL, offsetof(Machine, root_directory), 0),
- SD_BUS_METHOD("Terminate", NULL, NULL, method_terminate, 0),
- SD_BUS_METHOD("Kill", "si", NULL, method_kill, 0),
+ SD_BUS_METHOD("Terminate", NULL, NULL, method_terminate, SD_BUS_VTABLE_CAPABILITY(CAP_KILL)),
+ SD_BUS_METHOD("Kill", "si", NULL, method_kill, SD_BUS_VTABLE_CAPABILITY(CAP_KILL)),
SD_BUS_VTABLE_END
};