fat32: add more stubs
Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
parent
334bff74bc
commit
7aed4b6579
4 changed files with 130 additions and 14 deletions
|
|
@ -1,7 +1,10 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
#include <kernel/common.h>
|
||||
#include <kernel/slab.h>
|
||||
#include <kernel/block.h>
|
||||
|
||||
#include <fs/vfs.h>
|
||||
#include <fs/fat32.h>
|
||||
|
||||
#include <lib/string.h>
|
||||
|
||||
|
|
@ -26,21 +29,16 @@ static int open_inode(fs_t *fs, u64 id, dirent_t *dirent, inode_t **out)
|
|||
|
||||
static int fs_init(int flags, struct block_device *bdev, fs_t **out)
|
||||
{
|
||||
fs_t *fs = kalloc(sizeof(fs_t), ALLOC_KERN);
|
||||
if (!fs)
|
||||
return -ENOMEM;
|
||||
*out = fs;
|
||||
|
||||
fs->fs_ops.alloc_inode = alloc_inode;
|
||||
fs->fs_ops.free_inode = free_inode;
|
||||
fs->fs_ops.open_inode = open_inode;
|
||||
|
||||
return 0;
|
||||
return fat32_create(bdev, flags, out);
|
||||
}
|
||||
|
||||
static int fs_deinit(fs_t *fs)
|
||||
{
|
||||
return -EINVAL;
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
int fat32_create(struct block_device *bdev, u64 flags, fs_t **out)
|
||||
{
|
||||
}
|
||||
|
||||
void fat32_init()
|
||||
|
|
@ -48,5 +46,10 @@ void fat32_init()
|
|||
strcpy(fat32_driver.name, "fat32");
|
||||
fat32_driver.init = fs_init;
|
||||
fat32_driver.deinit = fs_deinit;
|
||||
|
||||
void fat32_inode_ops_init(void);
|
||||
fat32_inode_ops_init();
|
||||
|
||||
vfs_register(&fat32_driver);
|
||||
}
|
||||
DRIVER_ENTRY(fat32_init);
|
||||
|
|
|
|||
Loading…
Reference in a new issue