Re: [libosinfo 5/8] Add osinfo_db_identify_media

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

 



On Wed, Dec 05, 2012 at 06:42:43PM +0200, Zeeshan Ali (Khattak) wrote:
> > +
> > +/**
> > + * osinfo_db_identify_media:
> > + * @db: a #OsinfoDb database
> > + * @media: the installation media
> > + * data
> > + *
> > + * Try to match the @media created using osinfo_media_create_from_location()
> 
> This makes it sound like app developer doesn't have a choice. As an
> app developer, I'd think why is libosinfo not creating the media
> instance for me if it knows that I'll be doing that just before this
> call anyways.
> 
> I recall that you are doing it this way because implementing async
> version of this method will than be very difficult?

Not really difficult, but we already have async methods that can be used to
read the needed info from an image
(osinfo_media_create_from_location{_async}). It also does not strike me as
so bad to separate actual disk IO from DB lookups, Adding an all-in-one
method would mean at least 3 more API calls, redundant with the existing
functions, ... so I prefer to stay with the standalone _identify_media
call. Nothing prevents us from adding more calls later if they are really
needed, removing redundant calls is harder.

Christophe

Attachment: pgpbbD5MeNetP.pgp
Description: PGP signature

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list

[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux