TeamFAPS / PSVita-StorageMgr

kernel plugin that automatically mounts/redirects any storage device on any mount points you want
GNU General Public License v3.0
388 stars 40 forks source link

[Request] Add fallbacks to mounting points #2

Open satelliteseeker opened 6 years ago

satelliteseeker commented 6 years ago

It is better for the plugin to have fallbacks for mounting points to handle complex configurations.

For example, a user may want to mount GCD (SD2VITA) to ux0, but if mounting fails (bad or no Micro SD card is installed), the plugin may automatically mount Vita memory card (and if neither works, internal storage) to ux0, allowing the device to boot properly.

A possible strategy for the plugin is to parse each line in order and mount only when both the device and the mounting point are available, otherwise do nothing.

The config file may look like:

GCD=ux0
MCD=ux0
INT=ux0
UMA=uma0

Another example is for a PS TV to attempt to mount USB Drive as ux0 and memory card if there are none. If a USB drive is mounted and the memory card is idle, then mount it to xmc0.

UMA=ux0
MCD=ux0
MCD=xmc0
INT=imc0
GCD=grw0

I think this will be helpful to prevent the system being rendered unusable by a single storage failure and provide more configuration options to user.

CelesteBlue-dev commented 6 years ago

Already implemented for GCD. See : https://github.com/CelesteBlue-dev/PSVita-StorageMgr/blob/master/kernel/main.c#L961 I will check if it is implemented for UMA, and INT too.