Guest User

Untitled

a guest
Jan 10th, 2011
98
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Index: firmware/common/disk.c
  2. ===================================================================
  3. --- firmware/common/disk.c  (revision 29021)
  4. +++ firmware/common/disk.c  (working copy)
  5. @@ -263,19 +263,23 @@
  6.  
  7.  int disk_unmount_all(void)
  8.  {
  9. -#ifndef HAVE_MULTIDRIVE
  10. -    return disk_unmount(0);
  11. -#else  /* HAVE_MULTIDRIVE */
  12.      int unmounted = 0;
  13.      int i;
  14. -    for (i = 0; i < NUM_DRIVES; i++)
  15. +#ifdef HAVE_HOTSWAP
  16. +    mutex_lock(&disk_mutex);
  17. +#endif
  18. +    for (i=0; i<NUM_VOLUMES; i++)
  19.      {
  20. +        if(vol_drive[i] >= 0)
  21. +        {
  22. +            vol_drive[i] = -1; /* mark unused */
  23. +            unmounted++;
  24. +            release_files(i);
  25. +            release_dirs(i);
  26. +            fat_unmount(i, true);
  27. +        }
  28. +    }
  29.  #ifdef HAVE_HOTSWAP
  30. -        if (storage_present(i))
  31. +    mutex_unlock(&disk_mutex);
  32.  #endif
  33. -            unmounted += disk_unmount(i);
  34. -    }
  35.  
  36.      return unmounted;
  37. -#endif  /* HAVE_MULTIDRIVE */
  38.  }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×