mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-08-01 22:33:30 +00:00
kdat: move kerndat initialization to the very beginning
With kdat cache and unified kerndat_init() we can call it very early in crtools and then kdat information will be available for all cr-* actions. Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
parent
830dd3018f
commit
cfc980c614
3 changed files with 4 additions and 9 deletions
|
|
@ -1553,9 +1553,6 @@ int cr_pre_dump_tasks(pid_t pid)
|
|||
if (cr_plugin_init(CR_PLUGIN_STAGE__PRE_DUMP))
|
||||
goto err;
|
||||
|
||||
if (kerndat_init())
|
||||
goto err;
|
||||
|
||||
if (lsm_check_opts())
|
||||
goto err;
|
||||
|
||||
|
|
@ -1732,9 +1729,6 @@ int cr_dump_tasks(pid_t pid)
|
|||
if (cr_plugin_init(CR_PLUGIN_STAGE__DUMP))
|
||||
goto err;
|
||||
|
||||
if (kerndat_init())
|
||||
goto err;
|
||||
|
||||
if (lsm_check_opts())
|
||||
goto err;
|
||||
|
||||
|
|
|
|||
|
|
@ -2197,9 +2197,6 @@ int cr_restore_tasks(void)
|
|||
if (init_stats(RESTORE_STATS))
|
||||
goto err;
|
||||
|
||||
if (kerndat_init())
|
||||
goto err;
|
||||
|
||||
if (lsm_check_opts())
|
||||
goto err;
|
||||
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@
|
|||
#include "fault-injection.h"
|
||||
#include "lsm.h"
|
||||
#include "proc_parse.h"
|
||||
#include "kerndat.h"
|
||||
|
||||
#include "setproctitle.h"
|
||||
#include "sysctl.h"
|
||||
|
|
@ -316,6 +317,9 @@ int main(int argc, char *argv[], char *envp[])
|
|||
if (init_service_fd())
|
||||
return 1;
|
||||
|
||||
if (kerndat_init())
|
||||
return 1;
|
||||
|
||||
if (!strcmp(argv[1], "swrk")) {
|
||||
if (argc < 3)
|
||||
goto usage;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue