2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 22:35:33 +00:00

options: Use union for @daemon and @restore_detach

They both are using 'd' option in different context
though, lets give them two names.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Cyrill Gorcunov
2015-04-03 18:03:47 +03:00
committed by Pavel Emelyanov
parent 374017cfa4
commit 391d589482
2 changed files with 6 additions and 3 deletions

View File

@@ -558,10 +558,10 @@ int main(int argc, char *argv[], char *envp[])
} }
if (!strcmp(argv[optind], "page-server")) if (!strcmp(argv[optind], "page-server"))
return cr_page_server(opts.restore_detach, -1) > 0 ? 0 : 1; return cr_page_server(opts.daemon_mode, -1) > 0 ? 0 : 1;
if (!strcmp(argv[optind], "service")) if (!strcmp(argv[optind], "service"))
return cr_service(opts.restore_detach); return cr_service(opts.daemon_mode);
if (!strcmp(argv[optind], "dedup")) if (!strcmp(argv[optind], "dedup"))
return cr_dedup() != 0; return cr_dedup() != 0;

View File

@@ -27,7 +27,10 @@ struct cr_options {
char *show_fmt; char *show_fmt;
bool check_ms_kernel; bool check_ms_kernel;
bool show_pages_content; bool show_pages_content;
union {
bool restore_detach; bool restore_detach;
bool daemon_mode;
};
bool restore_sibling; bool restore_sibling;
bool ext_unix_sk; bool ext_unix_sk;
bool shell_job; bool shell_job;