From 7085053a437456ab87d726f3697002dd811fdf7a Mon Sep 17 00:00:00 2001 From: Daniel Wallace Date: Sun, 9 Jun 2013 15:54:39 -0500 Subject: Allow for the use of @ in remote host calls Without this you have to use %40 with the -H flag because dbus doesn't like the @ sign being unescaped. --- src/locale/localectl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/locale') diff --git a/src/locale/localectl.c b/src/locale/localectl.c index b5cd34439..cd7356a1e 100644 --- a/src/locale/localectl.c +++ b/src/locale/localectl.c @@ -46,7 +46,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 bool arg_convert = true; static void pager_open_if_enabled(void) { @@ -777,7 +778,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_CONVERT: -- cgit v1.2.3