mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-12 10:22:12 +02:00
Disk (Linux): ensure only physical devices are detected
Ref: https://github.com/fastfetch-cli/fastfetch/issues/731#issuecomment-1955814211
This commit is contained in:
@@ -33,14 +33,18 @@ static bool isPhysicalDevice(const struct mntent* device)
|
||||
if(ffStrEquals(device->mnt_type, "9p"))
|
||||
return true;
|
||||
|
||||
//ZFS pool or bcachefs filesystem
|
||||
if(ffStrEquals(device->mnt_type, "zfs") || ffStrEquals(device->mnt_type, "bcachefs"))
|
||||
//ZFS pool
|
||||
if(ffStrEquals(device->mnt_type, "zfs"))
|
||||
return true;
|
||||
|
||||
//Pseudo filesystems don't have a device in /dev
|
||||
if(!ffStrStartsWith(device->mnt_fsname, "/dev/"))
|
||||
return false;
|
||||
|
||||
//#731
|
||||
if(ffStrEquals(device->mnt_type, "bcachefs"))
|
||||
return true;
|
||||
|
||||
if(
|
||||
ffStrStartsWith(device->mnt_fsname + 5, "loop") || //Ignore loop devices
|
||||
ffStrStartsWith(device->mnt_fsname + 5, "ram") || //Ignore ram devices
|
||||
|
||||
Reference in New Issue
Block a user