X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Flocale%2Flocalectl.c;h=2632305dcc24c4e797cc781778940067222dada3;hb=bcd816bd349241bcd9c0bfbfd9cfe7b034ba351b;hp=76a53f6fff1e7c532c229505f0f03f6c45c6a057;hpb=0732ef7acf37473847992888bcb6446726d9d877;p=elogind.git diff --git a/src/locale/localectl.c b/src/locale/localectl.c index 76a53f6ff..2632305dc 100644 --- a/src/locale/localectl.c +++ b/src/locale/localectl.c @@ -128,8 +128,10 @@ static int show_status(sd_bus *bus, char **args, unsigned n) { "/org/freedesktop/locale1", map, &info); - if (r < 0) + if (r < 0) { + log_error("Could not get properties: %s", strerror(-r)); goto fail; + } print_status_info(&info); @@ -148,11 +150,13 @@ static int set_locale(sd_bus *bus, char **args, unsigned n) { polkit_agent_open_if_enabled(); - r = sd_bus_message_new_method_call(bus, + r = sd_bus_message_new_method_call( + bus, + &m, "org.freedesktop.locale1", "/org/freedesktop/locale1", "org.freedesktop.locale1", - "SetLocale", &m); + "SetLocale"); if (r < 0) return bus_log_create_error(r); @@ -415,7 +419,7 @@ static int nftw_cb( !endswith(fpath, ".map.gz")) return 0; - p = strdup(path_get_file_name(fpath)); + p = strdup(basename(fpath)); if (!p) return log_oom();