[Libosinfo] [v2 1/8] API to query format of device driver

Zeeshan Ali (Khattak) zeeshanak at gnome.org
Tue Feb 19 13:41:18 UTC 2013


On Tue, Feb 19, 2013 at 11:55 AM, Christophe Fergeau
<cfergeau at redhat.com> wrote:
> On Mon, Feb 18, 2013 at 07:45:09PM +0200, Zeeshan Ali (Khattak) wrote:
>> On Mon, Feb 18, 2013 at 7:05 PM, Christophe Fergeau <cfergeau at redhat.com> wrote:
>> > On Mon, Feb 18, 2013 at 04:03:12PM +0200, Zeeshan Ali (Khattak) wrote:
>> >> On Mon, Feb 18, 2013 at 3:20 PM, Christophe Fergeau <cfergeau at redhat.com> wrote:
>> >> > On Sat, Feb 16, 2013 at 05:38:27AM +0200, Zeeshan Ali (Khattak) wrote:
>> >> >> Actually you and I both missed something important here: The libosinfo
>> >> >> db doesn't just come from libosinfo. We allow downstream and apps to
>> >> >> add to the DB. They can as well add new device drivers.
>> >> >
>> >> > Currently install scripts only support one format, so there is not much
>> >> > point for downstream to add a driver in an unsupported format.
>> >>
>> >> 1. With my patches, winxp will support one format for preinstall
>> >> drivers and another for postinstall.
>> >
>> > Hmm true, but both formats are of the type 'copy all listed files to the
>> > installation disk, and libosinfo will know to make use of it'
>>
>> ? If you add a postinstall driver to winxp that does not provide .cmd
>> file, you can be sure that your driver will not be used. Similarly, if
>> you add a pre-installable driver, a executable/cmd file isn't what the
>> script is expecting.
>>
>> >> 2. How do apps find out which format is supported if they want to add
>> >> more drivers? Currently, only by looking at the scripts themselves
>> >> (which is more like asking them to read the source). It would
>> >> definitely be desirable to have a simple API like this to query such
>> >> info.
>> >
>> > See my answer to your point 1.
>>
>> Yes and I answered. If anyone adds driver(s) to DB, they really do
>> need to know which format it must be in. Without APIs, they'll have to
>> read the script template to figure it out.
>
> Ok, I was initially very confused about your answer as what I understood
> from this part of the email was "people writing xml to extend libosinfo DB
> needs the osinfo_device_driver_get_format C API because they need
> documentation about the formats we expect the drivers to be in", which did
> not make a lot of sense to me.
>
> From what you told me on IRC, it seems you are now indeed talking about
> people who write XML snippets to extend libosinfo DB and you want to make
> it more obvious to them what driver formats libosinfo expects. Please note
> that so far I was only talking about the addition of
> osinfo_device_driver_get_format in the public API and of nothing else.

This API alone is not very useful. The most interesting API is the one
to query supported format(s) from script.
osinfo_device_driver_get_format makes sense with that API in place (so
apps can check driver compatibility).

> Imo there are 2 different questions here
> 1.do we add extra driver format information to the XML? This is nice to
>   at least people writing extensions to the libosinfo database
> 2.do we expose this information in libosinfo public C API?
>
> So far, what I've said is that 2. is not useful and that I'm against it. 1.
> however sounds ok to me.

Another important point that I neglected to mention is that drivers
can come directly from app (without them adding/editing an XML). In
which case these APIs would be nice to have so they can decide whether
an arbitrary driver they want to install is compatible with our
script(s) or not. Also, if the driver installation does not work, they
can have some trace of what went wrong.

BTW, if we decide to add these API then the driver signature API makes
as much sense to add.

-- 
Regards,

Zeeshan Ali (Khattak)
FSF member#5124




More information about the Libosinfo mailing list