mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
implement override_path
Signed-off-by: Pascal Bauer <pascal.bauer@rwth-aachen.de>
This commit is contained in:
parent
285f3296f9
commit
8fb3de87aa
2 changed files with 10 additions and 1 deletions
|
@ -61,6 +61,9 @@ struct Region {
|
|||
};
|
||||
|
||||
class PciDevice : public Device {
|
||||
private:
|
||||
static constexpr char OVERRIDE_DEFAULT[] = "driver_override";
|
||||
|
||||
public:
|
||||
PciDevice(Id i, Slot s) : id(i), slot(s), log(Log::get("kernel:pci")) {}
|
||||
|
||||
|
@ -74,6 +77,7 @@ public:
|
|||
std::optional<std::unique_ptr<Driver>> driver() const override;
|
||||
std::optional<int> iommu_group() const override;
|
||||
std::string name() const override;
|
||||
std::filesystem::path override_path() const override;
|
||||
|
||||
// Bind a new LKM to the PCI device
|
||||
bool attachDriver(const std::string &driver) const;
|
||||
|
|
|
@ -468,4 +468,9 @@ std::string PciDevice::name() const {
|
|||
slot.device, slot.function);
|
||||
|
||||
return std::string(sysfs);
|
||||
}
|
||||
}
|
||||
// TODO: test
|
||||
std::filesystem::path PciDevice::override_path() const {
|
||||
|
||||
return this->path() / OVERRIDE_DEFAULT;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue