[syslinux] [PATCH] Add ldisk.c32 Lua module
Ferenc Wagner
wferi at niif.hu
Fri Nov 28 12:55:59 PST 2014
Paul Emmerich <p.emmerich at first-colo.net> writes:
> Q: Why would you need such a module if there is already disk.c32,
> hdt.c32 and other modules that detect disks?
> A: Automation. We’d like to use a Lua script that is executed on all
> of our servers on boot to collect hardware data, install systems,
> etc. The Lua API did not expose information about disks yet, so I
> wrote this module.
Moreover, with this on hand, disk.c32 could be pretty much replaced by
the detect_disks.lua script you provided in the patch.
My question is: does the single get_disks() function warrant a new
module? In the same vein, disk.get_disks() looks somewhat repetitive.
Do you foresee more stuff in this library?
I also pondered returning an iterator instead of a table of disks, but
that probably wouldn't buy us much as there aren't too many BIOS disks
anyway.
--
Regards,
Feri.
More information about the Syslinux
mailing list