mirror of
https://github.com/nitanmarcel/isodrive.git
synced 2026-03-13 04:17:24 +00:00
configfs: add /config as an alternate mount point
This commit is contained in:
12
src/util.cpp
12
src/util.cpp
@@ -10,6 +10,7 @@
|
||||
#include <array>
|
||||
#include <memory>
|
||||
#include <cstdio>
|
||||
#include <dirent.h>
|
||||
|
||||
char *fs_mount_point(char *filesystem_type) {
|
||||
struct mntent *ent;
|
||||
@@ -24,6 +25,17 @@ char *fs_mount_point(char *filesystem_type) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Alternate search location on Android
|
||||
if (mount_point == nullptr)
|
||||
{
|
||||
const char *alt_usb_gadget = "/config/usb_gadget";
|
||||
DIR *dir = opendir(alt_usb_gadget);
|
||||
if (dir)
|
||||
{
|
||||
mount_point = (char*)"/config";
|
||||
}
|
||||
}
|
||||
return mount_point;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user