[CRIU] [PATCH v6 02/13] devices: add support for /dev/autofs

Stanislav Kinsburskiy skinsbursky at virtuozzo.com
Wed Jan 27 09:56:58 PST 2016


This device doesn't support read or write operations and is expected to be
created by external process.
Thanks to that, regular dump options suits this device.

Signed-off-by: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
---
 files.c          |    3 +++
 include/autofs.h |    8 ++++++++
 2 files changed, 11 insertions(+)
 create mode 100644 include/autofs.h

diff --git a/files.c b/files.c
index db15527..aa23303 100644
--- a/files.c
+++ b/files.c
@@ -39,6 +39,7 @@
 #include "fs-magic.h"
 #include "proc_parse.h"
 #include "cr_options.h"
+#include "autofs.h"
 
 #include "parasite.h"
 #include "parasite-syscall.h"
@@ -321,6 +322,8 @@ static const struct fdtype_ops *get_misc_dev_ops(int minor)
 	switch (minor) {
 	case TUN_MINOR:
 		return &tunfile_dump_ops;
+	case AUTOFS_MINOR:
+		return &regfile_dump_ops;
 	};
 
 	return NULL;
diff --git a/include/autofs.h b/include/autofs.h
new file mode 100644
index 0000000..b30d915
--- /dev/null
+++ b/include/autofs.h
@@ -0,0 +1,8 @@
+#ifndef __CR_AUTOFS_H__
+#define __CR_AUTOFS_H__
+
+#ifndef AUTOFS_MINOR
+#define AUTOFS_MINOR	235
+#endif
+
+#endif



More information about the CRIU mailing list