Remove g_sequence_lookup from qemu-img help function
PATCH 1/1 Remove g_sequence_lookup from qemu-img help function
g_sequence_lookup is not supported by glib < 2.28. The usage of g_sequence_lookup is not essential in this context (it's a safeguard against duplicate values in the help message). Removing the call enables the build on all platforms and does not change the operation of the help function.
--- qemu-img.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
qemu-img.c +2 -5
@@ -70,11 +70,8 @@ static void add_format_to_seq(void *opaque, const char *fmt_name) {GSequence *seq = opaque; -if (!g_sequence_lookup (seq, (gpointer )fmt_name, - compare_data,NULL )) { -g_sequence_insert_sorted (seq, (gpointer )fmt_name, - compare_data,NULL ); - } +g_sequence_insert_sorted (seq, (gpointer )fmt_name, + compare_data,NULL ); } static void QEMU_NORETURN GCC_FMT_ATTR(1, 2) error_exit(const char *fmt, ...)
Signature · 1 line
1.9.0
On 05/13/2014 03:11 PM, Mike Day wrote:
Subject line could have used a [PATCHv2] designation to make it obvious this is a fixed version. But that doesn't affect what goes into git.
Quoted 10 lines
g_sequence_lookupis not supported by glib < 2.28. The usage ofg_sequence_lookupis not essential in this context (it's a safeguard against duplicate values in the help message). Removing the call enables the build on all platforms and does not change the operation of the help function.Signed-off-by Mike Day <[email protected]>--- qemu-img.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
Signature · 2 lines
Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Kevin Wolf
AppliedAm 13.05.2014 um 23:48 hat Eric Blake geschrieben:
Quoted 11 lines · Mike Day
Subject line could have used a [PATCHv2] designation to make it obvious this is a fixed version. But that doesn't affect what goes into git.
Quoted 6 lines
g_sequence_lookupis not supported by glib < 2.28. The usage ofg_sequence_lookupis not essential in this context (it's a safeguard against duplicate values in the help message). Removing the call enables the build on all platforms and does not change the operation of the help function.
Quoted 6 lines
Quoted 4 lines
Signed-off-by Mike Day <[email protected]>--- qemu-img.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)Reviewed-by Eric Blake <[email protected]>
Thanks, applied to the block branch.
Kevin
Quoted 12 lines · Kevin Wolf
Am 13.05.2014 um 23:48 hat Eric Blake geschrieben:
Quoted 11 lines · Mike Day
Subject line could have used a [PATCHv2] designation to make it obvious this is a fixed version. But that doesn't affect what goes into git.
Quoted 6 lines
g_sequence_lookupis not supported by glib < 2.28. The usage ofg_sequence_lookupis not essential in this context (it's a safeguard against duplicate values in the help message). Removing the call enables the build on all platforms and does not change the operation of the help function.
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Signed-off-by Mike Day <[email protected]>--- qemu-img.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)Reviewed-by Eric Blake <[email protected]>Thanks, applied to the block branch.
Ah, I was thinking about applying this directly since it's a build fix. But I guess it could go through the block branch instead...
thanks
-- PMM
Quoted 13 lines · Peter Maydell
Quoted 12 lines · Kevin Wolf
Am 13.05.2014 um 23:48 hat Eric Blake geschrieben:
Quoted 11 lines · Mike Day
Subject line could have used a [PATCHv2] designation to make it obvious this is a fixed version. But that doesn't affect what goes into git.
Quoted 6 lines
g_sequence_lookupis not supported by glib < 2.28. The usage ofg_sequence_lookupis not essential in this context (it's a safeguard against duplicate values in the help message). Removing the call enables the build on all platforms and does not change the operation of the help function.
Quoted 8 lines
Quoted 6 lines
Quoted 5 lines
Quoted 4 lines
Signed-off-by Mike Day <[email protected]>--- qemu-img.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)Reviewed-by Eric Blake <[email protected]>Thanks, applied to the block branch.
Ah, I was thinking about applying this directly since it's a build fix. But I guess it could go through the block branch instead...
Yes, could you please apply it directly?
Alex
Quoted 10 lines · On Tue, 13 May 2014 17:11:06 -0400 Mike Day <[email protected]> wrote:
g_sequence_lookupis not supported by glib < 2.28. The usage ofg_sequence_lookupis not essential in this context (it's a safeguard against duplicate values in the help message). Removing the call enables the build on all platforms and does not change the operation of the help function.Signed-off-by Mike Day <[email protected]>--- qemu-img.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
I don't get duplicates even without the safeguard :)