[Top][All Lists]

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

[bug#34195] [PATCH v2] linux-modules: Add modules-soft-dependencies.

From: Ludovic Courtès
Subject: [bug#34195] [PATCH v2] linux-modules: Add modules-soft-dependencies.
Date: Sat, 26 Jan 2019 16:19:15 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Danny Milosavljevic <address@hidden> skribis:

> On Sat, 26 Jan 2019 15:10:27 +0100
> Ludovic Courtès <address@hidden> wrote:
>> Danny Milosavljevic <address@hidden> skribis:
>> > scheme> (module-soft-dependencies "/tmp/vfio.ko")  
>> > $2 = (("post" . "vfio_iommu_spapr_tce") ("post" . "vfio_iommu_type1"))  
>> That’s probably not the best interface.  :-)
>> Perhaps it should return two values: the list of modules to be loaded
>> before (“pre”), followed by the list of modules to be loaded after
>> (“post”).
> I had thought about it - but for our use case it makes it slower and more
> complicated.

Once you have the result above, you can simply do:

  (partition (match-lambda
               (("pre" . _) #t)
               (("post" . _) #f))

and then remove the cars.  Or you can fold over the elements instead of
constructing the alist in the first place.

Anyway it should be a few more lines at most, I think.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]