-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Bad address (os error 14)
when trying to unmount filesystem
#90
Comments
What version are you using? I tried it with version 0.3.6 and it doesn't fail for me. With master branch it fails to compile. |
Thanks with 0.3.6 it seems to work now. let data_vec = vec![0_u8; 64 * 1024 * 1024];
let mut disk = Cursor::new(data_vec);
format_volume(&mut disk, FormatVolumeOptions::new().fat_type(fatfs::FatType::Fat32))?;
let fs = fatfs::FileSystem::new(disk, fatfs::FsOptions::new())?;
fs.unmount()?;
fs::write(diskname, data_vec)?; // ERROR: value used after move !!! |
Currently it is not possible to get back the inner Edit: More generic approach would be to borrow let data_vec = vec![0_u8; 64 * 1024 * 1024];
let mut disk = Cursor::new(data_vec);
format_volume(&mut disk, FormatVolumeOptions::new().fat_type(fatfs::FatType::Fat32))?;
let fs = fatfs::FileSystem::new(&mut disk, fatfs::FsOptions::new())?;
fs.unmount()?;
let data_vec = disk.into_inner();
fs::write(diskname, data_vec)?; |
The code below fails with the error
Error: Bad address (os error 14)
Is there an issue with my code or the library?
The text was updated successfully, but these errors were encountered: