]> git.proxmox.com Git - systemd.git/blobdiff - src/import/import-fs.c
New upstream version 242
[systemd.git] / src / import / import-fs.c
index 35ba6ba382cea98f36eb048dfc6ece50a2e6db61..04344492c86368f2dfb79b68c5983026a26c3cc1 100644 (file)
@@ -1,6 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
 #include <getopt.h>
+#include <locale.h>
 
 #include "alloc-util.h"
 #include "btrfs-util.h"
@@ -116,15 +117,13 @@ static int import_fs(int argc, char *argv[], void *userdata) {
 
         if (argc >= 2)
                 path = argv[1];
-        if (isempty(path) || streq(path, "-"))
-                path = NULL;
+        path = empty_or_dash_to_null(path);
 
         if (argc >= 3)
                 local = argv[2];
         else if (path)
                 local = basename(path);
-        if (isempty(local) || streq(local, "-"))
-                local = NULL;
+        local = empty_or_dash_to_null(local);
 
         if (local) {
                 if (!machine_name_is_valid(local)) {