aboutsummaryrefslogtreecommitdiff
path: root/qemu-img.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2020-11-02 06:58:41 -0500
committerStefan Hajnoczi <stefanha@redhat.com>2020-11-11 13:08:09 +0000
commit92eecfff32763ee138f4cebc1a12c5b051ad5bb5 (patch)
tree3b74701f9b1b6301b6e0a972eb7cc6bba22ad823 /qemu-img.c
parentc6f28ed5075df79fef39c500362a3f4089256c9c (diff)
trace: remove argument from trace_init_file
It is not needed, all the callers are just saving what was retrieved from -trace and trace_init_file can retrieve it on its own. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 20201102115841.4017692-1-pbonzini@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'qemu-img.c')
-rw-r--r--qemu-img.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/qemu-img.c b/qemu-img.c
index c2c56fc797..8bdea40b58 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -5466,7 +5466,6 @@ int main(int argc, char **argv)
const img_cmd_t *cmd;
const char *cmdname;
Error *local_error = NULL;
- char *trace_file = NULL;
int c;
static const struct option long_options[] = {
{"help", no_argument, 0, 'h'},
@@ -5516,8 +5515,7 @@ int main(int argc, char **argv)
printf(QEMU_IMG_VERSION);
return 0;
case 'T':
- g_free(trace_file);
- trace_file = trace_opt_parse(optarg);
+ trace_opt_parse(optarg);
break;
}
}
@@ -5535,7 +5533,7 @@ int main(int argc, char **argv)
if (!trace_init_backends()) {
exit(1);
}
- trace_init_file(trace_file);
+ trace_init_file();
qemu_set_log(LOG_TRACE);
/* find the command */