bsd-user: Use qemu_set_log_filename_flags

Perform all logfile setup in one step.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220417183019.755276-29-richard.henderson@linaro.org>
This commit is contained in:
Richard Henderson 2022-04-17 11:30:08 -07:00
parent 144539d360
commit 905c78fe60

View File

@ -405,16 +405,16 @@ int main(int argc, char **argv)
}
/* init debug */
qemu_set_log_filename(log_file, &error_fatal);
if (log_mask) {
int mask;
mask = qemu_str_to_log_mask(log_mask);
if (!mask) {
qemu_print_log_usage(stdout);
exit(1);
{
int mask = 0;
if (log_mask) {
mask = qemu_str_to_log_mask(log_mask);
if (!mask) {
qemu_print_log_usage(stdout);
exit(1);
}
}
qemu_set_log(mask, &error_fatal);
qemu_set_log_filename_flags(log_file, mask, &error_fatal);
}
if (optind >= argc) {