]> git.proxmox.com Git - mirror_qemu.git/commit
block: Fix bdrv_iterate_format() sorting
authorMax Reitz <mreitz@redhat.com>
Wed, 12 Oct 2016 20:49:05 +0000 (22:49 +0200)
committerMax Reitz <mreitz@redhat.com>
Fri, 11 Nov 2016 14:56:22 +0000 (15:56 +0100)
commitceff5bd79cdf94c650902fe9a20d316dcbfa1cc9
treebb750c7055041340987302406f303d2779d07492
parent07555ba6f303d4be8af538c3a66cc46ccb2e5751
block: Fix bdrv_iterate_format() sorting

bdrv_iterate_format() did not actually sort the formats by name but by
"pointer interpreted as string". That is probably not what we intended
to do, so fix it (by changing qsort_strcmp() so it matches the example
from qsort()'s manual page).

Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-id: 20161012204907.25941-2-mreitz@redhat.com
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
block.c