Disk (Android): actually detect something

This commit is contained in:
李通洲
2023-06-19 19:59:21 +08:00
committed by 李通洲
parent 8088905721
commit 2ec0353423
+4
View File
@@ -17,6 +17,8 @@
static bool isPhysicalDevice(FFstrbuf* device)
{
#ifndef __ANDROID__ //On Android, `/dev` is not accessable, so that the following checks always fail
//DrvFs is a filesystem plugin to WSL that was designed to support interop between WSL and the Windows filesystem.
if(ffStrbufEqualS(device, "drvfs"))
return true;
@@ -37,6 +39,8 @@ static bool isPhysicalDevice(FFstrbuf* device)
if(!ffStrbufStartsWithS(device, "/dev/"))
return false;
#endif // __ANDROID__
if(
ffStrbufStartsWithS(device, "/dev/loop") || //Ignore loop devices
ffStrbufStartsWithS(device, "/dev/ram") || //Ignore ram devices