[Libguestfs] [PATCH 3/3] daemon: inspection: discard os-release w/o version

Richard W.M. Jones rjones at redhat.com
Mon Oct 16 14:58:04 UTC 2017


On Mon, Oct 16, 2017 at 04:45:51PM +0200, Pino Toscano wrote:
> In case os-release does not contain VERSION_ID, and it is not an
> exception (like Void Linux), then discard the results got from
> os-release.
> 
> This matches what the old C code did -- e.g. see
> commit 32d19e3289bc259901f77398703f16cf6eabd510, and the changes in
> commit 0251c0fcaa4fbb3b42968792996748136700c8d8.
> ---
>  daemon/inspect_fs_unix.ml | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/daemon/inspect_fs_unix.ml b/daemon/inspect_fs_unix.ml
> index ba947c30e..8c7b1d83c 100644
> --- a/daemon/inspect_fs_unix.ml
> +++ b/daemon/inspect_fs_unix.ml
> @@ -111,6 +111,10 @@ let rec parse_os_release release_file data =
>            data.version <- Some (0, 0);
>            true
>  
> +       (* No version detected, so fall back to other ways. *)
> +       | { version = None } ->
> +          false
> +
>         | _ -> true
>       )
>  
> -- 
> 2.13.6

If this patch is valid on its own, then ACK.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW




More information about the Libguestfs mailing list