On 06/17/2016 05:44 PM, Denis V. Lunev wrote:
Changes from v8:
- fixed comment in patch 3
- changed stub for trace_opt_parse()
Changes from v7:
- added missed qemu-option-trace.texi
Changes from v6:
- changed order of patches 1 & 2
Changes from v5:
- added missed hunk into patch #7
Changes from v4:
- synced help descriprion for --trace with man for qemu.1/qemu-img.1/qemu-nbd.8
- moved @findex from qemu-option-trace.texi
Changes from v3:
- fixed difference in help/man for qemu-img/qemu-nbd
- created separate .texi to contain trace description, proper dependency is
added to makefile
- added --version/--help description to qemu-img
- fixed crash induced by new option processing scheme in qemu-img which
has happened when invoked as './qemu-img -K'
Changes from v2:
- tweaked man-pages of qemu-nbd/qemu-img
- added support for qemu-img (patches 4-5 as suggested)
Changes from v1:
- fixed nits found by Eric
Signed-off-by: Denis V. Lunev <d...@openvz.org>
Reviewed-by: Eric Blake <ebl...@redhat.com>
CC: Paolo Bonzini <pbonz...@redhat.com>
CC: Stefan Hajnoczi <stefa...@redhat.com>
CC: Kevin Wolf <kw...@redhat.com>
Denis V. Lunev (7):
doc: sync help descriprion for --trace with man for qemu.1
doc: move text describing --trace to specific .texi file
trace: move qemu_trace_opts to trace/control.c
trace: enable tracing in qemu-io
trace: enable tracing in qemu-nbd
qemu-img: move common options parsing before commands processing
trace: enable tracing in qemu-img
Makefile | 7 ++++---
qemu-img.c | 56 ++++++++++++++++++++++++++++++++++++++------------
qemu-img.texi | 13 +++++++++++-
qemu-io.c | 18 ++++++++++++----
qemu-nbd.c | 19 ++++++++++++++++-
qemu-nbd.texi | 3 +++
qemu-option-trace.texi | 25 ++++++++++++++++++++++
qemu-options.hx | 29 ++------------------------
trace/control.c | 42 ++++++++++++++++++++++++++++++++++++-
trace/control.h | 25 ++++++++++++----------
vl.c | 38 ++--------------------------------
11 files changed, 178 insertions(+), 97 deletions(-)
create mode 100644 qemu-option-trace.texi
Stefan,
there is a problem in this patchset. It breaks block
unit tests in a very interesting place. You should
apply the following simple change on top or
fix patch 6.
Can you pls apply it or I can resend the series.
irbis ~/src/qemu $ git diff
diff --git a/qemu-img.c b/qemu-img.c
index 3322a1e..2351686 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -3866,7 +3866,7 @@ int main(int argc, char **argv)
return 0;
}
argv += optind;
- optind = 1;
+ optind = 0;
if (!trace_init_backends()) {
exit(1);
irbis ~/src/qemu $
getopt_long() behaves very interesting....
Den