Got removable media mount detection working on Android.
Bionic has an amusing stub for `getmntent` that prints out "FIX ME! implement getmntent()" But, `/proc/mounts` is there, so I just parse it.
This commit is contained in:
parent
41e6c1de9a
commit
d35132810a
5 changed files with 37 additions and 9 deletions
|
@ -300,6 +300,10 @@ driveList = mapM (gen . mnt_dir) =<< filter sane <$> getMounts
|
|||
| dir == "/tmp" = False
|
||||
| dir == "/run/shm" = False
|
||||
| dir == "/run/lock" = False
|
||||
#ifdef __ANDROID__
|
||||
| dir == "/mnt/sdcard" = False
|
||||
| dir == "/sdcard" = False
|
||||
#endif
|
||||
| otherwise = True
|
||||
#else
|
||||
driveList = return []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue