mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-19 09:06:32 +00:00
将具体磁盘类型与fat32文件系统进行分离
This commit is contained in:
@ -13,6 +13,7 @@
|
||||
|
||||
#include <common/glib.h>
|
||||
#include <common/fcntl.h>
|
||||
#include <common/blk_types.h>
|
||||
|
||||
struct vfs_superblock_t *vfs_root_sb = NULL;
|
||||
|
||||
@ -53,6 +54,7 @@ struct vfs_superblock_t
|
||||
{
|
||||
struct vfs_dir_entry_t *root;
|
||||
struct vfs_super_block_operations_t *sb_ops;
|
||||
struct block_device * blk_device;
|
||||
void *private_sb_info;
|
||||
};
|
||||
|
||||
@ -91,7 +93,7 @@ struct vfs_filesystem_type_t
|
||||
{
|
||||
char *name;
|
||||
int fs_flags;
|
||||
struct vfs_superblock_t *(*read_superblock)(void *DPTE, uint8_t DPT_type, void *buf, int8_t ahci_ctrl_num, int8_t ahci_port_num, int8_t part_num); // 解析文件系统引导扇区的函数,为文件系统创建超级块结构。其中DPTE为磁盘分区表entry(MBR、GPT不同)
|
||||
struct vfs_superblock_t *(*read_superblock)(struct block_device *blk); // 解析文件系统引导扇区的函数,为文件系统创建超级块结构。
|
||||
struct vfs_filesystem_type_t *next;
|
||||
};
|
||||
|
||||
@ -174,12 +176,10 @@ uint64_t vfs_unregister_filesystem(struct vfs_filesystem_type_t *fs);
|
||||
* @brief 挂载文件系统
|
||||
*
|
||||
* @param name 文件系统名
|
||||
* @param DPTE 分区表entry
|
||||
* @param DPT_type 分区表类型
|
||||
* @param buf 文件系统的引导扇区
|
||||
* @param blk 块设备结构体
|
||||
* @return struct vfs_superblock_t*
|
||||
*/
|
||||
struct vfs_superblock_t *vfs_mount_fs(char *name, void *DPTE, uint8_t DPT_type, void *buf, int8_t ahci_ctrl_num, int8_t ahci_port_num, int8_t part_num);
|
||||
struct vfs_superblock_t *vfs_mount_fs(char *name, struct block_device *blk);
|
||||
|
||||
/**
|
||||
* @brief 按照路径查找文件
|
||||
|
Reference in New Issue
Block a user