fs: move fs init into kernel cmdline
Previously, any partition with an ext2 filesystem would be mounted by the gpt header parser. With this patch, the kernel cmdline `root=val` is responsible for mounting the root filesystem.
This commit is contained in:
parent
5ebafca2e6
commit
25a828437a
10 changed files with 150 additions and 32 deletions
|
|
@ -40,14 +40,15 @@ struct file {
|
|||
uint64_t size; /* size of the file */
|
||||
uint64_t pos; /* current position in the file */
|
||||
|
||||
void *fs_data;
|
||||
void *fs_file;
|
||||
};
|
||||
|
||||
struct fs_ops {
|
||||
int (*read)(void *fs, struct file *file, void *buf, size_t offset, size_t size);
|
||||
int (*write)(void *fs, struct file *file, void *buf, size_t offset, size_t size);
|
||||
int (*read)(void *fs, struct file *file, void *buf, size_t size);
|
||||
int (*write)(void *fs, struct file *file, void *buf, size_t size);
|
||||
int (*open)(void *fs, struct file *file, const char *path);
|
||||
int (*close)(void *fs, struct file *file);
|
||||
int (*seek)(void *fs, struct file *file, size_t offset);
|
||||
};
|
||||
|
||||
struct fs {
|
||||
|
|
@ -56,4 +57,6 @@ struct fs {
|
|||
struct fs_ops ops;
|
||||
};
|
||||
|
||||
void vfs_init(const char *rootfs);
|
||||
|
||||
#endif /* _VFS_H_ */
|
||||
|
|
|
|||
Loading…
Reference in a new issue