X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Flogin%2Floginctl.c;h=087e52d5039c17c8eaf1e8f0d872aad00f6e1550;hb=98a6e13;hp=caaea8dfaa5af7f070e4a82ea40732227612964d;hpb=391a4f72422ab18c0a6b5f291fa47f8d606b9e14;p=elogind.git diff --git a/src/login/loginctl.c b/src/login/loginctl.c index caaea8dfa..087e52d50 100644 --- a/src/login/loginctl.c +++ b/src/login/loginctl.c @@ -50,7 +50,8 @@ static enum transport { TRANSPORT_POLKIT } arg_transport = TRANSPORT_NORMAL; static bool arg_ask_password = true; -static const char *arg_host = NULL; +static char *arg_host = NULL; +static char *arg_user = NULL; static void pager_open_if_enabled(void) { @@ -1296,7 +1297,7 @@ static int help(void) { " -p --property=NAME Show only properties by this name\n" " -a --all Show all properties, including empty ones\n" " --kill-who=WHO Who to send signal to\n" - " --full Do not ellipsize output\n" + " -l --full Do not ellipsize output\n" " -s --signal=SIGNAL Which signal to send\n" " --no-ask-password Don't prompt for password\n" " -H --host=[USER@]HOST Show information for remote host\n" @@ -1338,7 +1339,6 @@ static int parse_argv(int argc, char *argv[]) { ARG_NO_PAGER, ARG_KILL_WHO, ARG_NO_ASK_PASSWORD, - ARG_FULL, }; static const struct option options[] = { @@ -1352,7 +1352,7 @@ static int parse_argv(int argc, char *argv[]) { { "host", required_argument, NULL, 'H' }, { "privileged", no_argument, NULL, 'P' }, { "no-ask-password", no_argument, NULL, ARG_NO_ASK_PASSWORD }, - { "full", no_argument, NULL, ARG_FULL }, + { "full", no_argument, NULL, 'l' }, { NULL, 0, NULL, 0 } }; @@ -1421,10 +1421,10 @@ static int parse_argv(int argc, char *argv[]) { case 'H': arg_transport = TRANSPORT_SSH; - arg_host = optarg; + parse_user_at_host(optarg, &arg_user, &arg_host); break; - case ARG_FULL: + case 'l': arg_full = true; break;