summaryrefslogtreecommitdiff
path: root/core/util-linux/move_is_mountinfo.patch
diff options
context:
space:
mode:
Diffstat (limited to 'core/util-linux/move_is_mountinfo.patch')
-rw-r--r--core/util-linux/move_is_mountinfo.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/core/util-linux/move_is_mountinfo.patch b/core/util-linux/move_is_mountinfo.patch
new file mode 100644
index 000000000..ad9387efc
--- /dev/null
+++ b/core/util-linux/move_is_mountinfo.patch
@@ -0,0 +1,46 @@
+diff --git a/libmount/src/tab.c b/libmount/src/tab.c
+index 3633b6a..8ae49c8 100644
+--- a/libmount/src/tab.c
++++ b/libmount/src/tab.c
+@@ -47,6 +47,20 @@
+ #include "strutils.h"
+ #include "loopdev.h"
+
++static int is_mountinfo(struct libmnt_table *tb)
++{
++ struct libmnt_fs *fs;
++
++ if (!tb)
++ return 0;
++
++ fs = list_first_entry(&tb->ents, struct libmnt_fs, ents);
++ if (fs && mnt_fs_is_kernel(fs) && mnt_fs_get_root(fs))
++ return 1;
++
++ return 0;
++}
++
+ /**
+ * mnt_new_table:
+ *
+@@ -1229,20 +1335,6 @@ err:
+ return NULL;
+ }
+
+-static int is_mountinfo(struct libmnt_table *tb)
+-{
+- struct libmnt_fs *fs;
+-
+- if (!tb)
+- return 0;
+-
+- fs = list_first_entry(&tb->ents, struct libmnt_fs, ents);
+- if (fs && mnt_fs_is_kernel(fs) && mnt_fs_get_root(fs))
+- return 1;
+-
+- return 0;
+-}
+-
+ /**
+ * mnt_table_is_fs__mounted:
+ * @tb: /proc/self/mountinfo file