mirror of
https://github.com/checkpoint-restore/criu
synced 2025-09-04 16:25:31 +00:00
crtools: move cr_options in a separate header
Signed-off-by: Andrey Vagin <avagin@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
08abebd29c
commit
4850fd94a8
@@ -37,6 +37,7 @@
|
||||
#include "kcmp-ids.h"
|
||||
#include "compiler.h"
|
||||
#include "crtools.h"
|
||||
#include "cr_options.h"
|
||||
#include "servicefd.h"
|
||||
#include "syscall.h"
|
||||
#include "ptrace.h"
|
||||
|
@@ -29,6 +29,7 @@
|
||||
#include "asm/types.h"
|
||||
#include "asm/restorer.h"
|
||||
|
||||
#include "cr_options.h"
|
||||
#include "servicefd.h"
|
||||
#include "image.h"
|
||||
#include "util.h"
|
||||
|
@@ -14,6 +14,7 @@
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "crtools.h"
|
||||
#include "cr_options.h"
|
||||
#include "util-pie.h"
|
||||
#include "util.h"
|
||||
#include "log.h"
|
||||
|
@@ -17,7 +17,7 @@
|
||||
#include "fdset.h"
|
||||
#include "namespaces.h"
|
||||
#include "compiler.h"
|
||||
#include "crtools.h"
|
||||
#include "cr_options.h"
|
||||
#include "util.h"
|
||||
#include "sockets.h"
|
||||
#include "image.h"
|
||||
|
@@ -20,6 +20,7 @@
|
||||
|
||||
#include "compiler.h"
|
||||
#include "crtools.h"
|
||||
#include "cr_options.h"
|
||||
#include "sockets.h"
|
||||
#include "syscall.h"
|
||||
#include "files.h"
|
||||
|
@@ -6,7 +6,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "crtools.h"
|
||||
#include "cr_options.h"
|
||||
#include "fdset.h"
|
||||
#include "image.h"
|
||||
#include "servicefd.h"
|
||||
|
@@ -5,7 +5,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "crtools.h"
|
||||
#include "cr_options.h"
|
||||
#include "fdset.h"
|
||||
#include "file-ids.h"
|
||||
#include "mount.h"
|
||||
|
2
image.c
2
image.c
@@ -1,6 +1,6 @@
|
||||
#include <unistd.h>
|
||||
#include <stdarg.h>
|
||||
#include "crtools.h"
|
||||
#include "cr_options.h"
|
||||
#include "fdset.h"
|
||||
#include "image.h"
|
||||
#include "eventpoll.h"
|
||||
|
43
include/cr_options.h
Normal file
43
include/cr_options.h
Normal file
@@ -0,0 +1,43 @@
|
||||
#ifndef __CR_OPTIONS_H__
|
||||
#define __CR_OPTIONS_H__
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "list.h"
|
||||
|
||||
struct script {
|
||||
struct list_head node;
|
||||
char *path;
|
||||
};
|
||||
|
||||
struct cr_options {
|
||||
int final_state;
|
||||
char *show_dump_file;
|
||||
bool check_ms_kernel;
|
||||
bool show_pages_content;
|
||||
bool restore_detach;
|
||||
bool ext_unix_sk;
|
||||
bool shell_job;
|
||||
bool handle_file_locks;
|
||||
bool tcp_established_ok;
|
||||
bool evasive_devices;
|
||||
bool link_remap_ok;
|
||||
unsigned int rst_namespaces_flags;
|
||||
bool log_file_per_pid;
|
||||
char *output;
|
||||
char *root;
|
||||
char *pidfile;
|
||||
struct list_head veth_pairs;
|
||||
struct list_head scripts;
|
||||
bool use_page_server;
|
||||
unsigned short ps_port;
|
||||
char *addr;
|
||||
bool track_mem;
|
||||
char *img_parent;
|
||||
};
|
||||
|
||||
extern struct cr_options opts;
|
||||
|
||||
extern void init_opts(void);
|
||||
|
||||
#endif
|
@@ -9,41 +9,6 @@
|
||||
|
||||
#define CR_FD_PERM (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH)
|
||||
|
||||
struct script {
|
||||
struct list_head node;
|
||||
char *path;
|
||||
};
|
||||
|
||||
struct cr_options {
|
||||
int final_state;
|
||||
char *show_dump_file;
|
||||
bool check_ms_kernel;
|
||||
bool show_pages_content;
|
||||
bool restore_detach;
|
||||
bool ext_unix_sk;
|
||||
bool shell_job;
|
||||
bool handle_file_locks;
|
||||
bool tcp_established_ok;
|
||||
bool evasive_devices;
|
||||
bool link_remap_ok;
|
||||
unsigned int rst_namespaces_flags;
|
||||
bool log_file_per_pid;
|
||||
char *output;
|
||||
char *root;
|
||||
char *pidfile;
|
||||
struct list_head veth_pairs;
|
||||
struct list_head scripts;
|
||||
bool use_page_server;
|
||||
unsigned short ps_port;
|
||||
char *addr;
|
||||
bool track_mem;
|
||||
char *img_parent;
|
||||
};
|
||||
|
||||
extern struct cr_options opts;
|
||||
|
||||
extern void init_opts(void);
|
||||
|
||||
int check_img_inventory(void);
|
||||
int write_img_inventory(void);
|
||||
void kill_inventory(void);
|
||||
|
@@ -1,6 +1,7 @@
|
||||
#ifndef __CR_PARASITE_SYSCALL_H__
|
||||
#define __CR_PARASITE_SYSCALL_H__
|
||||
|
||||
#include "asm/types.h"
|
||||
#include "pid.h"
|
||||
#include "list.h"
|
||||
|
||||
|
@@ -4,6 +4,8 @@
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
|
||||
#include "asm/types.h"
|
||||
|
||||
#define UNIX_PATH_MAX (sizeof(struct sockaddr_un) - \
|
||||
(size_t)((struct sockaddr_un *) 0)->sun_path)
|
||||
|
||||
|
2
ipc_ns.c
2
ipc_ns.c
@@ -8,7 +8,7 @@
|
||||
#include <sys/shm.h>
|
||||
|
||||
#include "util.h"
|
||||
#include "crtools.h"
|
||||
#include "cr_options.h"
|
||||
#include "fdset.h"
|
||||
#include "syscall.h"
|
||||
#include "namespaces.h"
|
||||
|
2
log.c
2
log.c
@@ -15,7 +15,7 @@
|
||||
#include "compiler.h"
|
||||
#include "asm/types.h"
|
||||
#include "util.h"
|
||||
#include "crtools.h"
|
||||
#include "cr_options.h"
|
||||
#include "servicefd.h"
|
||||
|
||||
#define DEFAULT_LOGFD STDERR_FILENO
|
||||
|
2
mem.c
2
mem.c
@@ -3,7 +3,7 @@
|
||||
#include <sys/mman.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "crtools.h"
|
||||
#include "cr_options.h"
|
||||
#include "servicefd.h"
|
||||
#include "mem.h"
|
||||
#include "parasite-syscall.h"
|
||||
|
2
mount.c
2
mount.c
@@ -12,7 +12,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
#include "crtools.h"
|
||||
#include "cr_options.h"
|
||||
#include "asm/types.h"
|
||||
#include "util.h"
|
||||
#include "util-pie.h"
|
||||
|
2
net.c
2
net.c
@@ -13,7 +13,7 @@
|
||||
#include "namespaces.h"
|
||||
#include "net.h"
|
||||
#include "libnetlink.h"
|
||||
#include "crtools.h"
|
||||
#include "cr_options.h"
|
||||
#include "sk-inet.h"
|
||||
#include "tun.h"
|
||||
#include "util-pie.h"
|
||||
|
@@ -3,7 +3,8 @@
|
||||
#include <arpa/inet.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "crtools.h"
|
||||
#include "cr_options.h"
|
||||
#include "servicefd.h"
|
||||
#include "image.h"
|
||||
#include "page-xfer.h"
|
||||
#include "page-pipe.h"
|
||||
|
1
pstree.c
1
pstree.c
@@ -2,6 +2,7 @@
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "cr_options.h"
|
||||
#include "pstree.h"
|
||||
#include "restorer.h"
|
||||
#include "util.h"
|
||||
|
@@ -11,7 +11,7 @@
|
||||
|
||||
#include "asm/types.h"
|
||||
#include "libnetlink.h"
|
||||
#include "crtools.h"
|
||||
#include "cr_options.h"
|
||||
#include "fdset.h"
|
||||
#include "inet_diag.h"
|
||||
#include "files.h"
|
||||
|
@@ -14,7 +14,9 @@
|
||||
#include "list.h"
|
||||
#include "fdset.h"
|
||||
#include "image.h"
|
||||
#include "servicefd.h"
|
||||
#include "crtools.h"
|
||||
#include "cr_options.h"
|
||||
#include "util.h"
|
||||
#include "util-pie.h"
|
||||
#include "sockets.h"
|
||||
|
2
sk-tcp.c
2
sk-tcp.c
@@ -6,7 +6,7 @@
|
||||
#include <sys/mman.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "crtools.h"
|
||||
#include "cr_options.h"
|
||||
#include "util.h"
|
||||
#include "list.h"
|
||||
#include "log.h"
|
||||
|
@@ -10,7 +10,7 @@
|
||||
|
||||
#include "asm/types.h"
|
||||
#include "libnetlink.h"
|
||||
#include "crtools.h"
|
||||
#include "cr_options.h"
|
||||
#include "fdset.h"
|
||||
#include "unix_diag.h"
|
||||
#include "files.h"
|
||||
|
2
tty.c
2
tty.c
@@ -17,7 +17,7 @@
|
||||
|
||||
#include "syscall.h"
|
||||
#include "files.h"
|
||||
#include "crtools.h"
|
||||
#include "cr_options.h"
|
||||
#include "fdset.h"
|
||||
#include "servicefd.h"
|
||||
#include "image.h"
|
||||
|
2
tun.c
2
tun.c
@@ -4,7 +4,7 @@
|
||||
#include <linux/if_tun.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
#include "crtools.h"
|
||||
#include "cr_options.h"
|
||||
#include "fdset.h"
|
||||
#include "protobuf.h"
|
||||
#include "cr-show.h"
|
||||
|
Reference in New Issue
Block a user