[CRIU] [RFC PATCH 6/6] turn "proc" into FSTYPE__AUTO

Oleg Nesterov oleg at redhat.com
Fri Mar 27 10:55:57 PDT 2015


Obviously not for inclusion, this is incompatible change. Just to see
if this works or not. Seems to work. So we could remove a lot more from
fstypes[].

Signed-off-by: Oleg Nesterov <oleg at redhat.com>
---
 mount.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/mount.c b/mount.c
index 0479b4e..e51a1f6 100644
--- a/mount.c
+++ b/mount.c
@@ -1038,9 +1038,6 @@ static struct fstype fstypes[32] = {
 		.name = "unsupported",
 		.code = FSTYPE__UNSUPPORTED,
 	}, {
-		.name = "proc",
-		.code = FSTYPE__PROC,
-	}, {
 		.name = "sysfs",
 		.code = FSTYPE__SYSFS,
 	}, {
@@ -1105,6 +1102,14 @@ static bool fstype_is_auto(const char *name)
 	if (!fsauto_names)
 		goto ret;;
 
+#define A(n)	(strcmp(name, #n) == 0)
+
+	if (A(proc))
+		return true;
+
+#undef  A
+
+
 	yes = strcmp(fsauto_names, "all") == 0;
 	if (yes)
 		goto ret;
-- 
1.5.5.1



More information about the CRIU mailing list