SDHC disk doesn't unmount #spi #driver

Lucas Peixoto

Hello, I'm working on manipulate data in a sdhc disk. My problem is that I can't unmount the disk. When I call the fs_unmount(structfs_mount_t *mp) function I got this error "fs ops functions not set!!" and is returned -22 error(-EINVAL). Looking for the cause of error I notice that is because (mp->fs->umount == NULL) is true, that is, doesn't exists a function pointer to unmount. After that I discovered that mp->fs is fs_map[mp->type], mp->fs is assigned in fs_mount function. But, as my file system is FAT, I think that the struct assigned to mp->fs is in the image attached.

So really, we don't have the function pointer to unmount and no one code related to unmount in fat_fs.c. This is really right? If someone is using sdhc disk and could help me, I appreciate it.

Join to automatically receive all group messages.