chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
cf6b9e2
)
Prep v233.3: Add 'loginctl list' as a shorthand for list-sessions
author
Sven Eden
<yamakuzure@gmx.net>
Thu, 20 Jul 2017 16:25:48 +0000
(18:25 +0200)
committer
Sven Eden
<yamakuzure@gmx.net>
Thu, 20 Jul 2017 16:25:48 +0000
(18:25 +0200)
src/login/loginctl.c
patch
|
blob
|
history
diff --git
a/src/login/loginctl.c
b/src/login/loginctl.c
index 13d8f807421c024077404eea2efe67294d2108b2..7da27605aeb1e57482845320212548431ef5f2d9 100644
(file)
--- a/
src/login/loginctl.c
+++ b/
src/login/loginctl.c
@@
-1419,7
+1419,9
@@
static int help(int argc, char *argv[], void *userdata) {
" -i --ignore-inhibitors When shutting down or sleeping, ignore inhibitors\n\n"
#endif // 0
"Session Commands:\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"
" session-status [ID...] Show session status\n"
" show-session [ID...] Show properties of sessions or the manager\n"
" activate [ID] Activate a session\n"
@@
-1620,7
+1622,12
@@
static int loginctl_main(int argc, char *argv[], sd_bus *bus) {
static const Verb verbs[] = {
{ "help", VERB_ANY, VERB_ANY, 0, help },
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 },
{ "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 },
{ "session-status", VERB_ANY, VERB_ANY, 0, show_session },
{ "show-session", VERB_ANY, VERB_ANY, 0, show_session },
{ "activate", VERB_ANY, 2, 0, activate },