static int my_init_filesystem(void)
{
	uffs_MountTable *mtbl = &(demo_mount_table[0]);

	/* setup nand storage attributes */
	setup_flash_storage(&g_my_flash_storage);

	/* setup memory allocator */
	uffs_MemSetupStaticAllocator(&demo_device_1.mem, static_buffer_par1, sizeof(static_buffer_par1));
	uffs_MemSetupStaticAllocator(&demo_device_2.mem, static_buffer_par2, sizeof(static_buffer_par2));

	/* register mount table */
	while(mtbl->dev) {
		// setup device init/release entry
		mtbl->dev->Init = my_InitDevice;
		mtbl->dev->Release = my_ReleaseDevice;
		uffs_RegisterMountTable(mtbl);
		mtbl++;
	}

	// mount partitions
	for (mtbl = &(demo_mount_table[0]); mtbl->mount != NULL; mtbl++) {
		uffs_Mount(mtbl->mount);
	}

	return uffs_InitFileSystemObjects() == U_SUCC ? 0 : -1;
}
static int init_uffs_fs(void)
{
	struct uffs_MountTableEntrySt *mtbl = &demo_mount;

	/* setup flash storage attributes */
	setup_storage(femu_GetStorage());

	/* setup memory allocator */
	uffs_MemSetupStaticAllocator(&mtbl->dev->mem, static_buffer_pool, sizeof(static_buffer_pool));

	/* setup device: init, release, attr */
	setup_device(mtbl->dev);

	/* register mount table */
	uffs_RegisterMountTable(mtbl);

	return uffs_InitMountTable() == U_SUCC ? 0 : -1;
}