]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
logind: let's change the type of the runtime directory size to uint64_t 9020/head
authorLennart Poettering <lennart@poettering.net>
Thu, 17 May 2018 02:33:13 +0000 (22:33 -0400)
committerLennart Poettering <lennart@poettering.net>
Thu, 24 May 2018 10:14:48 +0000 (12:14 +0200)
Externally it's an uint64_t anyway, and internally we most just
initialize it to physical_memory() which returns uint64_t, hence there's
exactly zero value in using it as size_t internally. Hence, let's fix
that, and use uint64_t everywhere.

src/login/logind-dbus.c
src/login/logind-user.c
src/login/logind.h

index 79a5be8af9cd58aed2680378e91c77be7b0d8b7e..7d7db0d8234c3376e65aca62a4f5a2cef9c83516 100644 (file)
@@ -2664,7 +2664,7 @@ const sd_bus_vtable manager_vtable[] = {
         SD_BUS_PROPERTY("ScheduledShutdown", "(st)", property_get_scheduled_shutdown, 0, 0),
         SD_BUS_PROPERTY("Docked", "b", property_get_docked, 0, 0),
         SD_BUS_PROPERTY("RemoveIPC", "b", bus_property_get_bool, offsetof(Manager, remove_ipc), SD_BUS_VTABLE_PROPERTY_CONST),
-        SD_BUS_PROPERTY("RuntimeDirectorySize", "t", bus_property_get_size, offsetof(Manager, runtime_dir_size), SD_BUS_VTABLE_PROPERTY_CONST),
+        SD_BUS_PROPERTY("RuntimeDirectorySize", "t", NULL, offsetof(Manager, runtime_dir_size), SD_BUS_VTABLE_PROPERTY_CONST),
         SD_BUS_PROPERTY("InhibitorsMax", "t", NULL, offsetof(Manager, inhibitors_max), SD_BUS_VTABLE_PROPERTY_CONST),
         SD_BUS_PROPERTY("NCurrentInhibitors", "t", property_get_hashmap_size, offsetof(Manager, inhibitors), 0),
         SD_BUS_PROPERTY("SessionsMax", "t", NULL, offsetof(Manager, sessions_max), SD_BUS_VTABLE_PROPERTY_CONST),
index f513555142a3f78420cc23ebc0f6deb77049f82c..8d3af6948c797cd67f8da052c10710ab22d4bb63 100644 (file)
@@ -707,7 +707,7 @@ int config_parse_tmpfs_size(
                 void *data,
                 void *userdata) {
 
-        size_t *sz = data;
+        uint64_t *sz = data;
         int r;
 
         assert(filename);
index bc6e6965504322aa89820568756196112babe797..4a80a0977e717b34da2cb70f783596974590323b 100644 (file)
@@ -121,7 +121,7 @@ struct Manager {
         usec_t holdoff_timeout_usec;
         sd_event_source *lid_switch_ignore_event_source;
 
-        size_t runtime_dir_size;
+        uint64_t runtime_dir_size;
         uint64_t user_tasks_max;
         uint64_t sessions_max;
         uint64_t inhibitors_max;