Skip to content

Commit 4b747f7

Browse files
committed
Disk (Linux): ensure only physical devices are detected
Ref: #731 (comment)
1 parent 5fb4b6d commit 4b747f7

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/detection/disk/disk_linux.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,18 @@ static bool isPhysicalDevice(const struct mntent* device)
3333
if(ffStrEquals(device->mnt_type, "9p"))
3434
return true;
3535

36-
//ZFS pool or bcachefs filesystem
37-
if(ffStrEquals(device->mnt_type, "zfs") || ffStrEquals(device->mnt_type, "bcachefs"))
36+
//ZFS pool
37+
if(ffStrEquals(device->mnt_type, "zfs"))
3838
return true;
3939

4040
//Pseudo filesystems don't have a device in /dev
4141
if(!ffStrStartsWith(device->mnt_fsname, "/dev/"))
4242
return false;
4343

44+
//#731
45+
if(ffStrEquals(device->mnt_type, "bcachefs"))
46+
return true;
47+
4448
if(
4549
ffStrStartsWith(device->mnt_fsname + 5, "loop") || //Ignore loop devices
4650
ffStrStartsWith(device->mnt_fsname + 5, "ram") || //Ignore ram devices

0 commit comments

Comments
 (0)