mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-18 12:16:31 +00:00
将具体磁盘类型与fat32文件系统进行分离
This commit is contained in:
@ -9,12 +9,9 @@ struct MBR_disk_partition_table_t MBR_partition_tables[MBR_MAX_AHCI_CTRL_NUM][MB
|
||||
*
|
||||
* @param ahci_ctrl_num ahci控制器编号
|
||||
* @param ahci_port_num ahci端口编号
|
||||
* @param buf 输出缓冲区(512字节)
|
||||
*/
|
||||
struct MBR_disk_partition_table_t *MBR_read_partition_table(uint8_t ahci_ctrl_num, uint8_t ahci_port_num)
|
||||
int MBR_read_partition_table(struct blk_gendisk *gd, void *buf)
|
||||
{
|
||||
unsigned char buf[512];
|
||||
memset(buf, 0, 512);
|
||||
ahci_operation.transfer(AHCI_CMD_READ_DMA_EXT, 0, 1, (uint64_t)&buf, ahci_ctrl_num, ahci_port_num);
|
||||
MBR_partition_tables[ahci_ctrl_num][ahci_port_num] = *(struct MBR_disk_partition_table_t *)buf;
|
||||
return &MBR_partition_tables[ahci_ctrl_num][ahci_port_num];
|
||||
return gd->fops->transfer(gd, AHCI_CMD_READ_DMA_EXT, 0, 1, (uint64_t)buf);
|
||||
}
|
Reference in New Issue
Block a user