Skip to content

Commit 24fb2de

Browse files
committed
Add excluded disks to disk_io
1 parent e9c9754 commit 24fb2de

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lnxlink/modules/disk_io.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ def _get_disks(self):
6969
disks = []
7070
for disk in glob.glob("/sys/block/*", recursive=False):
7171
disk_name = disk.removeprefix("/sys/block/")
72-
if "loop" in disk_name:
72+
excludes = ["loop", "ram"]
73+
if any(disk_name.startswith(x) for x in excludes):
7374
continue
7475
disks.append(disk_name)
7576
return disks

0 commit comments

Comments
 (0)