X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Flogin%2Flogind-dbus.c;h=48395f6f949c8a064c913013c1bfdbb03fedbf56;hb=7303ec8f3009d6630a994644ad9e539813badc52;hp=acef5119b16b590b2998fcf8d8fd06daaac792a0;hpb=630a4d9ea7298fb4a494662cbb4871069143ff56;p=elogind.git diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c index acef5119b..48395f6f9 100644 --- a/src/login/logind-dbus.c +++ b/src/login/logind-dbus.c @@ -41,7 +41,7 @@ #include "bus-util.h" #include "bus-error.h" #include "logind.h" -#include "bus-errors.h" +#include "bus-common-errors.h" #include "udev-util.h" static int property_get_idle_hint( @@ -1143,7 +1143,7 @@ static int attach_device(Manager *m, const char *seat, const char *sysfs) { return -ENOMEM; mkdir_p_label("/etc/udev/rules.d", 0755); - label_init("/etc"); + mac_selinux_init("/etc"); r = write_string_file_atomic_label(file, rule); if (r < 0) return r; @@ -1159,7 +1159,7 @@ static int flush_devices(Manager *m) { d = opendir("/etc/udev/rules.d"); if (!d) { if (errno != ENOENT) - log_warning("Failed to open /etc/udev/rules.d: %m"); + log_warning_errno(errno, "Failed to open /etc/udev/rules.d: %m"); } else { struct dirent *de; @@ -1175,7 +1175,7 @@ static int flush_devices(Manager *m) { continue; if (unlinkat(dirfd(d), de->d_name, 0) < 0) - log_warning("Failed to unlink %s: %m", de->d_name); + log_warning_errno(errno, "Failed to unlink %s: %m", de->d_name); } } @@ -1300,9 +1300,11 @@ static int bus_manager_log_shutdown( q = NULL; } - return log_struct(LOG_NOTICE, MESSAGE_ID(SD_MESSAGE_SHUTDOWN), + return log_struct(LOG_NOTICE, + LOG_MESSAGE_ID(SD_MESSAGE_SHUTDOWN), p, - q, NULL); + q, + NULL); } static int lid_switch_ignore_handler(sd_event_source *e, uint64_t usec, void *userdata) { @@ -1919,6 +1921,7 @@ const sd_bus_vtable manager_vtable[] = { SD_BUS_PROPERTY("HandleSuspendKey", "s", property_get_handle_action, offsetof(Manager, handle_suspend_key), SD_BUS_VTABLE_PROPERTY_CONST), SD_BUS_PROPERTY("HandleHibernateKey", "s", property_get_handle_action, offsetof(Manager, handle_hibernate_key), SD_BUS_VTABLE_PROPERTY_CONST), SD_BUS_PROPERTY("HandleLidSwitch", "s", property_get_handle_action, offsetof(Manager, handle_lid_switch), SD_BUS_VTABLE_PROPERTY_CONST), + SD_BUS_PROPERTY("HandleLidSwitchDocked", "s", property_get_handle_action, offsetof(Manager, handle_lid_switch_docked), SD_BUS_VTABLE_PROPERTY_CONST), SD_BUS_PROPERTY("IdleAction", "s", property_get_handle_action, offsetof(Manager, idle_action), SD_BUS_VTABLE_PROPERTY_CONST), SD_BUS_PROPERTY("IdleActionUSec", "t", NULL, offsetof(Manager, idle_action_usec), SD_BUS_VTABLE_PROPERTY_CONST), SD_BUS_PROPERTY("PreparingForShutdown", "b", property_get_preparing, 0, 0),