Allow passing --log_to_stderr via RPC.

Signed-off-by: Michał Cłapiński <mclapinski@google.com>
Signed-off-by: Michał Mirosław <emmir@google.com>
This commit is contained in:
Michał Cłapiński 2022-09-16 11:14:59 +02:00 committed by Andrei Vagin
parent 1e5ebec39d
commit 4b764a9dce
2 changed files with 4 additions and 0 deletions

View file

@ -394,6 +394,9 @@ static int setup_opts_from_req(int sk, CriuOpts *req)
}
SET_CHAR_OPTS(output, req->log_file);
} else if (req->has_log_to_stderr && req->log_to_stderr && !output_changed_by_rpc_conf) {
xfree(opts.output);
opts.output = NULL;
} else if (!opts.output) {
SET_CHAR_OPTS(output, DEFAULT_LOG_FILENAME);
}

View file

@ -142,6 +142,7 @@ message criu_opts {
optional bool unprivileged = 67;
optional bool leave_stopped = 69;
optional bool display_stats = 70;
optional bool log_to_stderr = 71;
/* optional bool check_mounts = 128; */
}