{}
};
+ _cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
char since1[FORMAT_TIMESTAMP_RELATIVE_MAX], *s1;
char since2[FORMAT_TIMESTAMP_MAX], *s2;
_cleanup_(session_status_info_clear) SessionStatusInfo i = {};
int r;
- r = bus_map_all_properties(bus, "org.freedesktop.login1", path, map, &i);
+ r = bus_map_all_properties(bus, "org.freedesktop.login1", path, map, &error, &i);
if (r < 0)
- return log_error_errno(r, "Could not get properties: %m");
+ return log_error_errno(r, "Could not get properties: %s", bus_error_message(&error, r));
if (*new_line)
printf("\n");
{}
};
+ _cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
char since1[FORMAT_TIMESTAMP_RELATIVE_MAX], *s1;
char since2[FORMAT_TIMESTAMP_MAX], *s2;
_cleanup_(user_status_info_clear) UserStatusInfo i = {};
int r;
- r = bus_map_all_properties(bus, "org.freedesktop.login1", path, map, &i);
+ r = bus_map_all_properties(bus, "org.freedesktop.login1", path, map, &error, &i);
if (r < 0)
- return log_error_errno(r, "Could not get properties: %m");
+ return log_error_errno(r, "Could not get properties: %s", bus_error_message(&error, r));
if (*new_line)
printf("\n");
{}
};
+ _cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
_cleanup_(seat_status_info_clear) SeatStatusInfo i = {};
int r;
- r = bus_map_all_properties(bus, "org.freedesktop.login1", path, map, &i);
+ r = bus_map_all_properties(bus, "org.freedesktop.login1", path, map, &error, &i);
if (r < 0)
- return log_error_errno(r, "Could not get properties: %m");
+ return log_error_errno(r, "Could not get properties: %s", bus_error_message(&error, r));
if (*new_line)
printf("\n");
" -i --ignore-inhibitors When shutting down or sleeping, ignore inhibitors\n\n"
#endif // 0
"Session Commands:\n"
- " list-sessions List sessions\n"
+#if 1 /// elogind has "list" as a shorthand for "list-sessions"
+ " list[-sessions] List sessions (default command)\n"
+#endif // 1
" session-status [ID...] Show session status\n"
" show-session [ID...] Show properties of sessions or the manager\n"
" activate [ID] Activate a session\n"
static const Verb verbs[] = {
{ "help", VERB_ANY, VERB_ANY, 0, help },
+#if 0 /// elogind has "list" as a shorthand for "list-sessions"
{ "list-sessions", VERB_ANY, 1, VERB_DEFAULT, list_sessions },
+#else
+ { "list", VERB_ANY, 1, VERB_DEFAULT, list_sessions },
+ { "list-sessions", VERB_ANY, 1, 0, list_sessions },
+#endif // 0
{ "session-status", VERB_ANY, VERB_ANY, 0, show_session },
{ "show-session", VERB_ANY, VERB_ANY, 0, show_session },
{ "activate", VERB_ANY, 2, 0, activate },