激活FAT32

This commit is contained in:
fslongjin
2022-04-26 13:12:59 +08:00
parent c14bd25059
commit d94d92f5ee
6 changed files with 33 additions and 60 deletions

View File

@ -156,7 +156,7 @@ void system_initialize()
process_init();
HPET_init();
//fat32_init();
fat32_init();
}
@ -188,13 +188,13 @@ void Start_Kernel(void)
// int part_id = fat32_register_partition(0, 0, 0);
struct vfs_dir_entry_t *dentry = fat32_path_walk("a.txt", 0);
if (dentry != NULL)
printk_color(ORANGE, BLACK, "Find a.txt\nDIR_FstClus:%#018lx\tDIR_FileSize:%#018lx\n", ((struct fat32_inode_info_t *)(dentry->dir_inode->private_inode_info))->first_clus, dentry->dir_inode->file_size);
printk_color(ORANGE, BLACK, "Found a.txt\nDIR_FstClus:%#018lx\tDIR_FileSize:%#018lx\n", ((struct fat32_inode_info_t *)(dentry->dir_inode->private_inode_info))->first_clus, dentry->dir_inode->file_size);
else
printk_color(ORANGE, BLACK, "Can`t find file\n");
dentry = fat32_path_walk("xx/12.png", 0);
if (dentry != NULL)
printk_color(ORANGE, BLACK, "Find a.txt\nDIR_FstClus:%#018lx\tDIR_FileSize:%#018lx\n", ((struct fat32_inode_info_t *)(dentry->dir_inode->private_inode_info))->first_clus, dentry->dir_inode->file_size);
printk_color(ORANGE, BLACK, "Found xx/12.png\nDIR_FstClus:%#018lx\tDIR_FileSize:%#018lx\n", ((struct fat32_inode_info_t *)(dentry->dir_inode->private_inode_info))->first_clus, dentry->dir_inode->file_size);
else
printk_color(ORANGE, BLACK, "Can`t find file\n");