chiark / gitweb /
networkd: split out vlan and macvlan handling
[elogind.git] / src / locale / localectl.c
index 76a53f6fff1e7c532c229505f0f03f6c45c6a057..2632305dcc24c4e797cc781778940067222dada3 100644 (file)
@@ -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();