chiark / gitweb /
localectl: log error if bus_map_all_properties() fails
[elogind.git] / src / locale / localectl.c
index 76a53f6fff1e7c532c229505f0f03f6c45c6a057..5929169fe52938d386d7a774aec6e65399e1634b 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);
 
@@ -415,7 +417,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();