qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 10/13] block/nbd: Use URI parsing code from glib


From: Eric Blake
Subject: Re: [PATCH v2 10/13] block/nbd: Use URI parsing code from glib
Date: Fri, 12 Apr 2024 09:45:48 -0500
User-agent: NeoMutt/20240201

On Fri, Apr 12, 2024 at 03:24:12PM +0200, Thomas Huth wrote:
> Since version 2.66, glib has useful URI parsing functions, too.
> Use those instead of the QEMU-internal ones to be finally able
> to get rid of the latter. The g_uri_get_host() also takes care
> of removing the square brackets from IPv6 addresses, so we can
> drop that part of the QEMU code now, too.
> 
> Reviewed-by: Richard W.M. Jones <rjones@redhat.com>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  block/nbd.c | 76 ++++++++++++++++++++++++++---------------------------
>  1 file changed, 37 insertions(+), 39 deletions(-)
> 

>  
>      /* transport */
> -    if (!g_strcmp0(uri->scheme, "nbd")) {
> +    uri_scheme = g_uri_get_scheme(uri);
> +    if (!g_strcmp0(uri_scheme, "nbd")) {
>          is_unix = false;

As with gluster, we should probably be using g_ascii_strcasecmp() here
to match the RFC; again, worth a separate patch.

Reviewed-by: Eric Blake <eblake@redhat.com>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.
Virtualization:  qemu.org | libguestfs.org




reply via email to

[Prev in Thread] Current Thread [Next in Thread]