[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] PCI device enumeration for lua
From: |
Evan Broder |
Subject: |
[PATCH] PCI device enumeration for lua |
Date: |
Wed, 27 Oct 2010 15:29:56 -0400 |
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] PCI device enumeration for lua,
Evan Broder <=