Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/disk/mapperdev.py
diff options
context:
space:
mode:
Diffstat (limited to 'archinstall/lib/disk/mapperdev.py')
-rw-r--r--archinstall/lib/disk/mapperdev.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/archinstall/lib/disk/mapperdev.py b/archinstall/lib/disk/mapperdev.py
index 32e3ac9b..913dbc13 100644
--- a/archinstall/lib/disk/mapperdev.py
+++ b/archinstall/lib/disk/mapperdev.py
@@ -51,11 +51,11 @@ class MapperDev:
raise ValueError(f"Could not convert {self.mappername} to a real dm-crypt device")
@property
- def mountpoint(self) -> Optional[str]:
+ def mountpoint(self) -> Optional[pathlib.Path]:
try:
data = json.loads(SysCommand(f"findmnt --json -R {self.path}").decode())
for filesystem in data['filesystems']:
- return filesystem.get('target')
+ return pathlib.Path(filesystem.get('target'))
except SysCallError as error:
# Not mounted anywhere most likely
@@ -76,8 +76,9 @@ class MapperDev:
@property
def subvolumes(self) -> Iterator['BtrfsSubvolume']:
- from .btrfs import get_subvolumes_from_findmnt
-
+ from .btrfs import subvolume_info_from_path
+
for mountpoint in self.mount_information:
- for result in get_subvolumes_from_findmnt(mountpoint):
- yield result \ No newline at end of file
+ if target := mountpoint.get('target'):
+ if subvolume := subvolume_info_from_path(pathlib.Path(target)):
+ yield subvolume \ No newline at end of file