[Libguestfs] [PATCH 7/7] lib/canonical-name.c: Hide errors.

Pino Toscano ptoscano at redhat.com
Mon Jul 27 17:06:55 UTC 2020


On Monday, 30 March 2020 17:03:42 CEST Richard W.M. Jones wrote:
> Fixes “XXX” comment.  This turns out to be necessary in order to
> suppress a warning when inspecting Windows BitLocker-encrypted guests.
> ---
>  lib/canonical-name.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/canonical-name.c b/lib/canonical-name.c
> index 052bbf12c..11cf6fed6 100644
> --- a/lib/canonical-name.c
> +++ b/lib/canonical-name.c
> @@ -46,8 +46,9 @@ guestfs_impl_canonical_device_name (guestfs_h *g, const char *device)
>    }
>    else if (STRPREFIX (device, "/dev/mapper/") ||
>             STRPREFIX (device, "/dev/dm-")) {
> -    /* XXX hide errors */
> +    guestfs_push_error_handler (g, NULL, NULL);
>      ret = guestfs_lvm_canonical_lv_name (g, device);
> +    guestfs_pop_error_handler (g);

Which warning is it? This also ignores all the errors from the API.

-- 
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20200727/88a282ff/attachment.sig>


More information about the Libguestfs mailing list