]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libmount: make kernel_fs_postparse() more robust
authorKarel Zak <kzak@redhat.com>
Fri, 15 Apr 2016 12:48:29 +0000 (14:48 +0200)
committerKarel Zak <kzak@redhat.com>
Fri, 15 Apr 2016 12:48:29 +0000 (14:48 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
libmount/src/tab_parse.c

index 264b8ca370daf4f17a06996de74976450e2ac664..3f5e14abb1a245dd0bd6fe0f5fafb8afbec5ac22 100644 (file)
@@ -589,10 +589,12 @@ static int kernel_fs_postparse(struct libmnt_table *tb,
                if (rc == 0 && real) {
                        DBG(TAB, ul_debugobj(tb, "canonical root FS: %s", real));
                        rc = __mnt_fs_set_source_ptr(fs, real);
+
+               } else if (rc == 1) {
+                       /* mnt_guess_system_root() returns 1 if not able to conver to
+                        * the real devname; ignore this problem */
+                       rc = 0;
                }
-               /* mnt_guess_system_root() returns 1 if not able to conver to
-                * the real devname; ignore this problem */
-               rc = 0;
        }
 
        return rc;