mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
implement path
Signed-off-by: Pascal Bauer <pascal.bauer@rwth-aachen.de>
This commit is contained in:
parent
8fb3de87aa
commit
1be07a7ed1
2 changed files with 12 additions and 0 deletions
|
@ -78,6 +78,7 @@ public:
|
|||
std::optional<int> iommu_group() const override;
|
||||
std::string name() const override;
|
||||
std::filesystem::path override_path() const override;
|
||||
std::filesystem::path path() const override;
|
||||
|
||||
// Bind a new LKM to the PCI device
|
||||
bool attachDriver(const std::string &driver) const;
|
||||
|
|
|
@ -469,6 +469,17 @@ std::string PciDevice::name() const {
|
|||
|
||||
return std::string(sysfs);
|
||||
}
|
||||
|
||||
// TODO: test
|
||||
std::filesystem::path PciDevice::path() const {
|
||||
char sysfs[1024];
|
||||
|
||||
snprintf(sysfs, sizeof(sysfs), "%04x:%02x:%02x.%x", slot.domain, slot.bus,
|
||||
slot.device, slot.function);
|
||||
|
||||
return sysfs;
|
||||
};
|
||||
|
||||
// TODO: test
|
||||
std::filesystem::path PciDevice::override_path() const {
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue