]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: expose number of file descriptors in fd store on the bus
authorLennart Poettering <lennart@poettering.net>
Mon, 2 Nov 2015 22:09:06 +0000 (23:09 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 2 Nov 2015 22:44:05 +0000 (23:44 +0100)
For each service expose how many file descriptors there are currently in
the fd store.

(Also, fix the exporting of the fdstore limit, given that the field is
just an "unsigned" but we exported it as "uint32_t". Not that there way
any effective difference, but let's make this clean...)

src/core/dbus-service.c

index c41b3e1723ab3105ace6d5f5feab6c3169b6e7a0..24f611a593e8fd465913565feb1c15e72c2e02f8 100644 (file)
@@ -63,7 +63,8 @@ const sd_bus_vtable bus_service_vtable[] = {
         SD_BUS_PROPERTY("MainPID", "u", bus_property_get_pid, offsetof(Service, main_pid), SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE),
         SD_BUS_PROPERTY("ControlPID", "u", bus_property_get_pid, offsetof(Service, control_pid), SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE),
         SD_BUS_PROPERTY("BusName", "s", NULL, offsetof(Service, bus_name), SD_BUS_VTABLE_PROPERTY_CONST),
-        SD_BUS_PROPERTY("FileDescriptorStoreMax", "u", NULL, offsetof(Service, n_fd_store_max), SD_BUS_VTABLE_PROPERTY_CONST),
+        SD_BUS_PROPERTY("FileDescriptorStoreMax", "u", bus_property_get_unsigned, offsetof(Service, n_fd_store_max), SD_BUS_VTABLE_PROPERTY_CONST),
+        SD_BUS_PROPERTY("NFileDescriptorStore", "u", bus_property_get_unsigned, offsetof(Service, n_fd_store), 0),
         SD_BUS_PROPERTY("StatusText", "s", NULL, offsetof(Service, status_text), SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE),
         SD_BUS_PROPERTY("StatusErrno", "i", NULL, offsetof(Service, status_errno), SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE),
         SD_BUS_PROPERTY("Result", "s", property_get_result, offsetof(Service, result), SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE),