summaryrefslogtreecommitdiffstats
path: root/libmount/src/tab_parse.c
diff options
context:
space:
mode:
authorKarel Zak2016-04-15 14:48:29 +0200
committerKarel Zak2016-04-15 14:48:29 +0200
commita772281dff903b9e761c4d8a6c2ecad7d5f944ba (patch)
tree46f7d9fb9e9d343f693ffa60f5af8e5b53f0c637 /libmount/src/tab_parse.c
parentlibmount: fix mnt_table_parse_stream() logic (diff)
downloadkernel-qcow2-util-linux-a772281dff903b9e761c4d8a6c2ecad7d5f944ba.tar.gz
kernel-qcow2-util-linux-a772281dff903b9e761c4d8a6c2ecad7d5f944ba.tar.xz
kernel-qcow2-util-linux-a772281dff903b9e761c4d8a6c2ecad7d5f944ba.zip
libmount: make kernel_fs_postparse() more robust
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libmount/src/tab_parse.c')
-rw-r--r--libmount/src/tab_parse.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libmount/src/tab_parse.c b/libmount/src/tab_parse.c
index 264b8ca37..3f5e14abb 100644
--- a/libmount/src/tab_parse.c
+++ b/libmount/src/tab_parse.c
@@ -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;