[Libosinfo] [libosinfo PATCH 0/6] A few fixes/improvements related to media detect

Cole Robinson crobinso at redhat.com
Mon Jun 24 23:27:55 UTC 2019


On 6/24/19 9:16 AM, Fabiano Fidêncio wrote:
> This series includes a few fixes to media detect including:
> - Using case insensitive compares for the "/ppc/bootinfo.txt" file;
> - Adding new APIs to avoid erroring out when a media is not bootable;
> - Adding new APIs to check whether a media is bootable or not;
> 
> There is still no change on osinfo-detect, but that may come later in
> case these patches are accepted.
> 
> Related: https://gitlab.com/libosinfo/libosinfo/issues/15
> 
> Fabiano Fidêncio (6):
>   media: Ignore case when detecting bootable ppc ISO
>   media: Add OsinfoMediaDetectFlags
>   media: Add create_from_location_with_flags* APIs
>   media: Rewrite create_from_location* functions
>   media: Only error out if a media is not bootable when REQUIRE_BOOTABLE
>     flag is passed
>   media: Add _is_bootable() API
> 
>  osinfo/libosinfo.syms |   6 ++
>  osinfo/osinfo_media.c | 126 ++++++++++++++++++++++++++++++++++++++----
>  osinfo/osinfo_media.h |  25 +++++++++
>  3 files changed, 145 insertions(+), 12 deletions(-)
> 

Nice! Thanks for this. I gave it a spin and it fixed issues in my local
media test suite.

For osinfo_media_create_from_location_with_flags, I needed to swap the
Error and flags argument order. Otherwise gobject introspection python
bindings wanted us to pass an Error, which isn't expected, it seems to
hide that detail for other APIs and turn errors into exceptions. All the
other APIs have the GError argument as the last arg, so there must be
something special about that placement.

With that fixed:

Reviewed-by: Cole Robinson <crobinso at redhat.com>

- Cole




More information about the Libosinfo mailing list