Commit f466f811 authored by zhul's avatar zhul 🌵

去除代码中 criu 相关内容

parent 1859290d
This diff is collapsed.
...@@ -122,7 +122,7 @@ ifeq ($(GMON),1) ...@@ -122,7 +122,7 @@ ifeq ($(GMON),1)
export GMON GMONLDOPT export GMON GMONLDOPT
endif endif
CFLAGS += $(USERCFLAGS) $(WARNINGS) $(DEFINES) -iquote include/ CFLAGS += $(USERCFLAGS) $(WARNINGS) $(DEFINES) -iquote include/ -w
HOSTCFLAGS += $(WARNINGS) $(DEFINES) -iquote include/ HOSTCFLAGS += $(WARNINGS) $(DEFINES) -iquote include/
export CFLAGS USERCLFAGS HOSTCFLAGS export CFLAGS USERCLFAGS HOSTCFLAGS
......
...@@ -29,7 +29,7 @@ export PREFIX BINDIR SBINDIR MANDIR RUNDIR ...@@ -29,7 +29,7 @@ export PREFIX BINDIR SBINDIR MANDIR RUNDIR
export LIBDIR INCLUDEDIR LIBEXECDIR export LIBDIR INCLUDEDIR LIBEXECDIR
install-man: install-man:
$(Q) $(MAKE) -C Documentation install #$(Q) $(MAKE) -C Documentation install
.PHONY: install-man .PHONY: install-man
install-lib: lib install-lib: lib
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include "types.h" #include "types.h"
#include "asm/compat.h" #include "asm/compat.h"
#include <stdlib.h>
#undef LOG_PREFIX #undef LOG_PREFIX
#define LOG_PREFIX "x86: " #define LOG_PREFIX "x86: "
...@@ -16,6 +17,9 @@ ...@@ -16,6 +17,9 @@
#define XSAVE_PB_NELEMS(__s, __obj, __member) \ #define XSAVE_PB_NELEMS(__s, __obj, __member) \
(sizeof(__s) / sizeof(*(__obj)->__member)) (sizeof(__s) / sizeof(*(__obj)->__member))
char *rpc_cfg_file = NULL;
int save_task_regs(void *x, user_regs_struct_t *regs, user_fpregs_struct_t *fpregs) int save_task_regs(void *x, user_regs_struct_t *regs, user_fpregs_struct_t *fpregs)
{ {
CoreEntry *core = x; CoreEntry *core = x;
......
...@@ -204,7 +204,7 @@ int main(int argc, char *argv[], char *envp[]) ...@@ -204,7 +204,7 @@ int main(int argc, char *argv[], char *envp[])
if (!strcmp(argv[optind], "restore")) { if (!strcmp(argv[optind], "restore")) {
if (opts.tree_id) if (opts.tree_id)
pr_warn("Using -t with criu restore is obsoleted\n"); pr_warn("Using -t with crbk restore is obsoleted\n");
ret = cr_restore_tasks(); ret = cr_restore_tasks();
if (ret == 0 && opts.exec_cmd) { if (ret == 0 && opts.exec_cmd) {
...@@ -256,15 +256,19 @@ int main(int argc, char *argv[], char *envp[]) ...@@ -256,15 +256,19 @@ int main(int argc, char *argv[], char *envp[])
pr_msg("Error: unknown command: %s\n", argv[optind]); pr_msg("Error: unknown command: %s\n", argv[optind]);
usage: usage:
if (usage_error) {
return 1;
}
return 0;
pr_msg("\n" pr_msg("\n"
"Usage:\n" "Usage:\n"
" criu dump|pre-dump -t PID [<options>]\n" " crbk dump|pre-dump -t PID [<options>]\n"
" criu restore [<options>]\n" " crbk restore [<options>]\n"
" criu check [--feature FEAT]\n" " crbk check [--feature FEAT]\n"
" criu page-server\n" " crbk page-server\n"
" criu service [<options>]\n" " crbk service [<options>]\n"
" criu dedup\n" " crbk dedup\n"
" criu lazy-pages -D DIR [<options>]\n" " crbk lazy-pages -D DIR [<options>]\n"
"\n" "\n"
"Commands:\n" "Commands:\n"
" dump checkpoint a process/tree identified by pid\n" " dump checkpoint a process/tree identified by pid\n"
...@@ -309,8 +313,8 @@ usage: ...@@ -309,8 +313,8 @@ usage:
" --freeze-cgroup use cgroup freezer to collect processes\n" " --freeze-cgroup use cgroup freezer to collect processes\n"
" --weak-sysctls skip restoring sysctls that are not available\n" " --weak-sysctls skip restoring sysctls that are not available\n"
" --lazy-pages restore pages on demand\n" " --lazy-pages restore pages on demand\n"
" this requires running a second instance of criu\n" " this requires running a second instance of crbk\n"
" in lazy-pages mode: 'criu lazy-pages -D DIR'\n" " in lazy-pages mode: 'crbk lazy-pages -D DIR'\n"
" --lazy-pages and lazy-pages mode require userfaultfd\n" " --lazy-pages and lazy-pages mode require userfaultfd\n"
"\n" "\n"
"* External resources support:\n" "* External resources support:\n"
...@@ -340,7 +344,7 @@ usage: ...@@ -340,7 +344,7 @@ usage:
" --action-script FILE add an external action script\n" " --action-script FILE add an external action script\n"
" -j|--" OPT_SHELL_JOB " allow one to dump and restore shell jobs\n" " -j|--" OPT_SHELL_JOB " allow one to dump and restore shell jobs\n"
" -l|--" OPT_FILE_LOCKS " handle file locks, for safety, only used for container\n" " -l|--" OPT_FILE_LOCKS " handle file locks, for safety, only used for container\n"
" -L|--libdir path to a plugin directory (by default " CR_PLUGIN_DEFAULT ")\n" " -L|--libdir path to a plugin directory\n"
" --force-irmap force resolving names for inotify/fsnotify watches\n" " --force-irmap force resolving names for inotify/fsnotify watches\n"
" --irmap-scan-path FILE\n" " --irmap-scan-path FILE\n"
" add a path the irmap hints to scan\n" " add a path the irmap hints to scan\n"
...@@ -368,7 +372,7 @@ usage: ...@@ -368,7 +372,7 @@ usage:
" The type can be either 'apparmor' or 'selinux'.\n" " The type can be either 'apparmor' or 'selinux'.\n"
" --skip-mnt PATH ignore this mountpoint when dumping the mount namespace\n" " --skip-mnt PATH ignore this mountpoint when dumping the mount namespace\n"
" --enable-fs FSNAMES a comma separated list of filesystem names or \"all\"\n" " --enable-fs FSNAMES a comma separated list of filesystem names or \"all\"\n"
" force criu to (try to) dump/restore these filesystem's\n" " force crbk to (try to) dump/restore these filesystem's\n"
" mountpoints even if fs is not supported\n" " mountpoints even if fs is not supported\n"
" --inherit-fd fd[NUM]:RES\n" " --inherit-fd fd[NUM]:RES\n"
" Inherit file descriptors, treating fd NUM as being\n" " Inherit file descriptors, treating fd NUM as being\n"
...@@ -387,7 +391,7 @@ usage: ...@@ -387,7 +391,7 @@ usage:
" user:PID,UID,GID\n" " user:PID,UID,GID\n"
"\n" "\n"
"Check options:\n" "Check options:\n"
" Without options, \"criu check\" checks availability of absolutely required\n" " Without options, \"crbk check\" checks availability of absolutely required\n"
" kernel features, critical for performing dump and restore.\n" " kernel features, critical for performing dump and restore.\n"
" --extra add check for extra kernel features\n" " --extra add check for extra kernel features\n"
" --experimental add check for experimental kernel features\n" " --experimental add check for experimental kernel features\n"
......
...@@ -141,7 +141,7 @@ struct cr_options { ...@@ -141,7 +141,7 @@ struct cr_options {
}; };
extern struct cr_options opts; extern struct cr_options opts;
char *rpc_cfg_file; extern char *rpc_cfg_file;
extern int parse_options(int argc, char **argv, bool *usage_error, bool *has_exec_cmd, int state); extern int parse_options(int argc, char **argv, bool *usage_error, bool *has_exec_cmd, int state);
extern int check_options(); extern int check_options();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment