[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
- Re: [PATCH v2 07/13] Bump minimum glib version to v2.66, (continued)
- [PATCH v2 08/13] Remove glib compatibility code that is not required anymore, Thomas Huth, 2024/04/12
- [PATCH v2 09/13] block/gluster: Use URI parsing code from glib, Thomas Huth, 2024/04/12
- [PATCH v2 10/13] block/nbd: Use URI parsing code from glib, Thomas Huth, 2024/04/12
- Re: [PATCH v2 10/13] block/nbd: Use URI parsing code from glib,
Eric Blake <=
- [PATCH v2 12/13] block/ssh: Use URI parsing code from glib, Thomas Huth, 2024/04/12
- [PATCH v2 11/13] block/nfs: Use URI parsing code from glib, Thomas Huth, 2024/04/12
- [PATCH v2 13/13] util/uri: Remove the old URI parsing code, Thomas Huth, 2024/04/12