Hi - This patch adds anew enum_pci(callback) function to the Lua grub library for enumerating devices on the PCI bus. This is not currently possible because there's no way to get the output of a command from grub.run.
While I think that would be useful to have in the more general case, in this particular case using the internal grub_pci_iterate function is better, because it keeps Lua code from having to parse the lengthy output from the lspci command. The callback function passed to enum_pci is called once for each device found: the bus index, the device index, the function index, the PCI ID as a single numeric value, and the device class. Thanks, - Evan
grub_lua_enum_pci.diff
Description: Binary data
_______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel