From: Karel Zak Date: Fri, 15 Apr 2016 12:48:29 +0000 (+0200) Subject: libmount: make kernel_fs_postparse() more robust X-Git-Tag: v2.28.1~55 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc304c7ce450ac9c1c8318061a17ccb5383958f5;p=thirdparty%2Futil-linux.git libmount: make kernel_fs_postparse() more robust Signed-off-by: Karel Zak --- diff --git a/libmount/src/tab_parse.c b/libmount/src/tab_parse.c index 0b858a043b..342223e133 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;