chiark / gitweb /
fstab-generator: add missing strempty() calls
authorMantas Mikul─Śnas <grawity@gmail.com>
Mon, 25 Mar 2013 19:10:29 +0000 (21:10 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 25 Mar 2013 19:14:29 +0000 (20:14 +0100)
src/fstab-generator/fstab-generator.c

index 7f065eb..9754f3a 100644 (file)
@@ -403,7 +403,7 @@ static int parse_fstab(const char *prefix, bool initrd) {
                 if (errno == ENOENT)
                         return 0;
 
-                log_error("Failed to open %s/etc/fstab: %m", prefix);
+                log_error("Failed to open %s/etc/fstab: %m", strempty(prefix));
                 return -errno;
         }
 
@@ -415,7 +415,7 @@ static int parse_fstab(const char *prefix, bool initrd) {
                         continue;
 
                 what = fstab_node_to_udev_node(me->mnt_fsname);
-                where = strjoin(prefix, me->mnt_dir, NULL);
+                where = strjoin(strempty(prefix), me->mnt_dir, NULL);
                 if (!what || !where) {
                         r = log_oom();
                         goto finish;