summaryrefslogtreecommitdiff
path: root/core/util-linux/move_is_mountinfo.patch
blob: ad9387efc3a39049fc39d4dc76a74b71b57d19f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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