Пример #1
0
void
cfs_close(int fd)
{
  File *file = get_file(fd);
  if (!file) return;
  file_fclose(file);
  fs_flushFs(&sdcard_efs.myFs);
}
Пример #2
0
/**
 * This function will set a hook function, which will be invoked when a memory 
 * block is allocated from heap memory.
 * 
 * @param hook the hook function
 */
int efs_unmount(struct dfs_filesystem* fs)
{
	efsl_fs* efsfs;

	efsfs = (efsl_fs*) fs->data;
	if ( efsfs == RT_NULL ) return -DFS_STATUS_EINVAL;

	fs_flushFs(&efsfs->filesystem);
	rt_free(efsfs->partition.ioman);
	rt_free(efsfs);

	fs->data = RT_NULL;

	return 0;
}