Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: firmware/common/disk.c
- ===================================================================
- --- firmware/common/disk.c (revision 29021)
- +++ firmware/common/disk.c (working copy)
- @@ -263,19 +263,23 @@
- int disk_unmount_all(void)
- {
- -#ifndef HAVE_MULTIDRIVE
- - return disk_unmount(0);
- -#else /* HAVE_MULTIDRIVE */
- int unmounted = 0;
- int i;
- - for (i = 0; i < NUM_DRIVES; i++)
- +#ifdef HAVE_HOTSWAP
- + mutex_lock(&disk_mutex);
- +#endif
- + for (i=0; i<NUM_VOLUMES; i++)
- {
- + if(vol_drive[i] >= 0)
- + {
- + vol_drive[i] = -1; /* mark unused */
- + unmounted++;
- + release_files(i);
- + release_dirs(i);
- + fat_unmount(i, true);
- + }
- + }
- #ifdef HAVE_HOTSWAP
- - if (storage_present(i))
- + mutex_unlock(&disk_mutex);
- #endif
- - unmounted += disk_unmount(i);
- - }
- return unmounted;
- -#endif /* HAVE_MULTIDRIVE */
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement