hosted: Fix USB mounting code to work with HAVE_MULTIDRIVE enabled

Change-Id: I48944c28903db117d3d883a5e777cafe5d055600
This commit is contained in:
Solomon Peachy 2020-10-17 17:25:38 -04:00
parent f3ec58c05b
commit 6f9a157fca
3 changed files with 50 additions and 9 deletions

View file

@ -28,6 +28,11 @@
#include "power.h"
#include "power-fiio.h"
#ifdef HAVE_MULTIDRIVE
void cleanup_rbhome(void);
void startup_rbhome(void);
#endif
const char * const sysfs_usb_online =
"/sys/class/power_supply/usb/online";
@ -68,6 +73,9 @@ void usb_enable(bool on)
*/
int disk_mount_all(void)
{
#ifdef HAVE_MULTIDRIVE
startup_rbhome();
#endif
return 1;
}
@ -77,6 +85,10 @@ int disk_mount_all(void)
*/
int disk_unmount_all(void)
{
#ifdef HAVE_MULTIDRIVE
cleanup_rbhome();
#endif
return 1;
}