device: add support for parent devices
This allows device nesting, i.e. one device being opened inside another one.
This commit is contained in:
parent
6ea5ce1836
commit
45d0594b1b
7 changed files with 128 additions and 11 deletions
|
|
@ -78,7 +78,7 @@ class LoopbackService(devices.DeviceService):
|
|||
|
||||
return lo
|
||||
|
||||
def open(self, devpath: str, tree: str, options: Dict):
|
||||
def open(self, devpath: str, parent: str, tree: str, options: Dict):
|
||||
filename = options["filename"]
|
||||
self.sector_size = options.get("sector-size", 512)
|
||||
start = options.get("start", 0) * self.sector_size
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue