2020-01-05 09:00:43 +01:00
|
|
|
#include <kernel/fs/smemfs.h>
|
2020-02-24 00:05:27 +01:00
|
|
|
#include <kernel/util/atomic.h>
|
2020-01-05 09:00:43 +01:00
|
|
|
|
2020-01-08 10:14:11 +01:00
|
|
|
/* casio_smem_mount() - Mount the file system (sync) */
|
2020-05-03 23:10:49 +02:00
|
|
|
void *smemfs_USB2_mount(void)
|
2020-01-05 09:00:43 +01:00
|
|
|
{
|
2020-05-04 23:47:09 +02:00
|
|
|
extern struct smemfs_USB2_superblock smemfs_USB2_superblock;
|
2020-01-08 10:14:11 +01:00
|
|
|
void *root_inode;
|
|
|
|
|
|
|
|
// Start atomic operation
|
|
|
|
atomic_start();
|
|
|
|
|
|
|
|
// Get root inode
|
2020-05-04 23:47:09 +02:00
|
|
|
root_inode = smemfs_USB2_superblock.sector_table;
|
2020-01-08 10:14:11 +01:00
|
|
|
|
|
|
|
// Stop atomic operation
|
|
|
|
atomic_stop();
|
2020-01-05 09:00:43 +01:00
|
|
|
|
|
|
|
// Return the sector table to simulate the root inode.
|
2020-01-08 10:14:11 +01:00
|
|
|
return (root_inode);
|
2020-01-05 09:00:43 +01:00
|
|
|
}
|