mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-23 10:28:05 +00:00
Here is nothing interecting. If a file can't be dumped by criu, plugins are called. If one of plugins knows how to dump the file, the file entry is marked as need_callback. On restore if we see this mark, we execute plugins for restoring the file. v2: Callbacks are called for all files, which are not supported by CRIU. v3: Call plugins for a file instead of file descriptor. A few file descriptors can be associated with one file. v4: A file descriptor is opened in a callback. It's required for restoring anon vmas. v5: Add a separate type for unsupported files v6: define FD_TYPES__UNSUPP v7: s/unsupp/ext (external) Signed-off-by: Andrey Vagin <avagin@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
39 lines
1.2 KiB
C
39 lines
1.2 KiB
C
/*
|
|
This file defines types and macros for CRIU plugins.
|
|
Copyright (C) 2013 Parallels, Inc
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program; if not, write to the Free Software
|
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
*/
|
|
|
|
#ifndef __CRIU_PLUGIN_H__
|
|
#define __CRIU_PLUGIN_H__
|
|
|
|
#include <limits.h>
|
|
#include <stdbool.h>
|
|
|
|
typedef int (cr_plugin_init_t)(void);
|
|
typedef void (cr_plugin_fini_t)(void);
|
|
|
|
typedef int (cr_plugin_dump_unix_sk_t)(int fd, int id);
|
|
typedef int (cr_plugin_restore_unix_sk_t)(int id);
|
|
|
|
typedef int (cr_plugin_dump_file_t)(int fd, int id);
|
|
typedef int (cr_plugin_restore_file_t)(int id);
|
|
|
|
/* Public API */
|
|
extern int criu_get_image_dir(void);
|
|
|
|
#endif
|