1 Map unsupported ConsoleKit methods to supported ones
3 --- upower-0.99.4/src/bsd/up-backend-common.c.~1~ 2015-07-08 11:30:24.000000000 +0000
4 +++ upower-0.99.4/src/bsd/up-backend-common.c 2018-01-18 12:13:50.439742956 +0000
6 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
11 #include "up-backend-bsd-private.h"
15 up_backend_take_action (UpBackend *backend)
18 + GVariant* method_arg;
19 GDBusProxy *seat_manager_proxy = up_backend_get_seat_manager_proxy (backend);
21 method = up_backend_get_critical_action (backend);
22 + method_arg = g_variant_new ("(b)", FALSE);
24 +#if defined (__sun) && defined (__SVR4)
25 +/* Map methods to supported ck_* methods */
26 + if (strcmp(method, "PowerOff") == 0) {
29 + } else if (strcmp(method, "Hibernate") == 0) {
33 g_assert (method != NULL);
36 g_debug ("About to call ConsoleKit2 method %s", method);
37 g_dbus_proxy_call (seat_manager_proxy,
39 - g_variant_new ("(b)", FALSE),
41 G_DBUS_CALL_FLAGS_NONE,