X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Ftimedate%2Ftimedatectl.c;h=d2b483efac4beac8e8f4514115e0e65dc4361f69;hp=e8bc4529f365620d59cf7c6625a88ddeed4a389b;hb=7085053a437456ab87d726f3697002dd811fdf7a;hpb=856323c9cb0ef368367126588d0b43b4846ab0d7 diff --git a/src/timedate/timedatectl.c b/src/timedate/timedatectl.c index e8bc4529f..d2b483efa 100644 --- a/src/timedate/timedatectl.c +++ b/src/timedate/timedatectl.c @@ -44,7 +44,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) { @@ -560,7 +561,7 @@ 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_NO_ASK_PASSWORD: