ProgramGen / tasks /data /reverse /9elements__go-linux-lowlevel-hw.8b54f74 /environment /docs /commands.md
ProgramGen / tasks /data /reverse /9elements__go-linux-lowlevel-hw.8b54f74 /environment /docs /commands.md
|
Download tasks/data/reverse/9elements__go-linux-lowlevel-hw.8b54f74/environment/docs/commands.md from Lego-X/ProgramGen: direct link, hf CLI and curl.
- Browser
- Download file 942 Bytes
-
https://huggingface.co/datasets/Lego-X/ProgramGen/resolve/main/tasks/data/reverse/9elements__go-linux-lowlevel-hw.8b54f74/environment/docs/commands.md
- Command line
-
hf download hf://datasets/Lego-X/ProgramGen/tasks/data/reverse/9elements__go-linux-lowlevel-hw.8b54f74/environment/docs/commands.md
-
curl -L -o commands.md https://huggingface.co/datasets/Lego-X/ProgramGen/resolve/main/tasks/data/reverse/9elements__go-linux-lowlevel-hw.8b54f74/environment/docs/commands.md
942 Bytes
Example Commands
cmd/test_pci_walk
test_pci_walk is the repository's example command-line tool. It uses
pkg/hwapi (via hwapi.GetAPI()) and demonstrates the PCI enumeration
interface:
PCIEnumerateVisibleDevices(cb func(d PCIDevice) (abort bool)) error— walks all PCI devices visible to the host, invoking the callback for each device.- Per-device helpers such as
PCIReadVendorID,PCIReadDeviceID, andPCIReadConfig8/16/32read identification and configuration data.
Behavior
- Input: none (no flags); the walk covers all PCI devices visible on the running system.
- Output: information about each enumerated PCI device (vendor/device IDs and configuration data, as chosen by the example's callback).
- Requires elevated privileges (root) on Linux, since PCI configuration space is accessed directly.
Build and run
go build -o test_pci_walk ./cmd/test_pci_walk
sudo ./test_pci_walk