Skip to content

Commit 77fde11

Browse files
committed
Disk (Linux): fix fastfetch doesn't show Windows drives (/mnt/c)
1 parent e13f04e commit 77fde11

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/detection/disk/disk_linux.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,6 @@
1717

1818
static bool isPhysicalDevice(FFstrbuf* device)
1919
{
20-
struct stat deviceStat;
21-
if(stat(device->chars, &deviceStat) != 0)
22-
return false;
23-
24-
//Ignore all devices that are not block devices
25-
if(!S_ISBLK(deviceStat.st_mode))
26-
return false;
27-
2820
//DrvFs is a filesystem plugin to WSL that was designed to support interop between WSL and the Windows filesystem.
2921
if(ffStrbufEqualS(device, "drvfs"))
3022
return true;
@@ -33,6 +25,14 @@ static bool isPhysicalDevice(FFstrbuf* device)
3325
if(ffStrbufStartsWithS(device, "rpool/"))
3426
return true;
3527

28+
struct stat deviceStat;
29+
if(stat(device->chars, &deviceStat) != 0)
30+
return false;
31+
32+
//Ignore all devices that are not block devices
33+
if(!S_ISBLK(deviceStat.st_mode))
34+
return false;
35+
3636
//Pseudo filesystems don't have a device in /dev
3737
if(!ffStrbufStartsWithS(device, "/dev/"))
3838
return false;

0 commit comments

Comments
 (0)