mirror of
https://github.com/checkpoint-restore/criu
synced 2025-09-01 06:45:35 +00:00
opt: cpu-cap -- Make it as optional_argument
This slightly changes the visible API, but i think it's safe now. The idea behind it to make single --cpu-cap to indicate "--cpu-cap all". Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
3914b180d3
commit
88f488e31f
@@ -98,6 +98,11 @@ static int parse_cpu_cap(struct cr_options *opts, const char *optarg)
|
|||||||
(__opts)->cpu_cap |= (__cap); \
|
(__opts)->cpu_cap |= (__cap); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
if (!optarg) {
|
||||||
|
____cpu_set_cap(opts, CPU_CAP_ALL, false);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
for (; *optarg; optarg++) {
|
for (; *optarg; optarg++) {
|
||||||
if (optarg[0] == '^') {
|
if (optarg[0] == '^') {
|
||||||
inverse = !inverse;
|
inverse = !inverse;
|
||||||
@@ -171,7 +176,7 @@ int main(int argc, char *argv[], char *envp[])
|
|||||||
{ "track-mem", no_argument, 0, 1055},
|
{ "track-mem", no_argument, 0, 1055},
|
||||||
{ "auto-dedup", no_argument, 0, 1056},
|
{ "auto-dedup", no_argument, 0, 1056},
|
||||||
{ "libdir", required_argument, 0, 'L'},
|
{ "libdir", required_argument, 0, 'L'},
|
||||||
{ "cpu-cap", required_argument, 0, 1057},
|
{ "cpu-cap", optional_argument, 0, 1057},
|
||||||
{ "force-irmap", no_argument, 0, 1058},
|
{ "force-irmap", no_argument, 0, 1058},
|
||||||
{ "ext-mount-map", required_argument, 0, 'M'},
|
{ "ext-mount-map", required_argument, 0, 'M'},
|
||||||
{ "exec-cmd", no_argument, 0, 1059},
|
{ "exec-cmd", no_argument, 0, 1059},
|
||||||
|
Reference in New Issue
Block a user