feat: vfs support sdcard hotplug

close: #I44WH1
Signed-off-by: mucor <mucorwang@gmail.com>
This commit is contained in:
mucor
2021-08-11 11:36:05 +08:00
parent e1472b494f
commit 2db80ecb38
4 changed files with 397 additions and 0 deletions

View File

@@ -1422,10 +1422,13 @@ DISK_FIND_ERROR:
INT32 los_disk_deinit(INT32 diskID)
{
int ret;
los_disk *disk = get_disk(diskID);
if (disk == NULL) {
return -EINVAL;
}
ret = ForceUmountDev(disk->dev);
PRINTK("warning: %s lost, force umount ret = %d\n", disk->disk_name, ret);
DISK_LOCK(&disk->disk_mutex);