qemu-img: sort block formats in help message
commit1a443c1b8b4314d365e82bddeb1de5b4b1c15fb3
authorMike Day <ncmike@ncultra.org>
Mon, 5 May 2014 16:53:34 +0000 (5 12:53 -0400)
committerStefan Hajnoczi <stefanha@redhat.com>
Fri, 9 May 2014 11:32:16 +0000 (9 13:32 +0200)
tree26491eb7170038c778ce22cf4cc3475a05626aa4
parentf915db07ef9c368ea6db6430256de064fdd1525f
qemu-img: sort block formats in help message

The help message for qemu-img lists the supported block formats, of
which there are 27 as of version 2.0.50. The formats are printed in
the order of their driver's position in a linked list, which appears
random. This patch prints the formats in sorted order, making it
easier to read and to find a specific format in the list.

[Added suggestions from Fam Zheng <famz@redhat.com> to declare variables
at the top of the scope in help() and to omit explicit cast for void*
opaque.
--Stefan]

Signed-off-by: Mike Day <ncmike@ncultra.org>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
qemu-img.c