mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 10:07:38 -04:00
disk: In "superfloppy" mode, create a fake partition entry
We normally create a table of the partition sizes/types present on a drive. Howeever, if the drive is set up as a "superfloppy", where there is no partition table and a single filesystem starting at sector 0, this "pinfo" table is not populated. So now, populate the pinfo table with a single entry that matches the filesystem type, start, and size. Change-Id: Ifa8760909109d67ff96481b1fc7f26c64280a00a
This commit is contained in:
parent
12b9419006
commit
c31518201c
1 changed files with 7 additions and 0 deletions
|
@ -396,6 +396,13 @@ int disk_mount(int drive)
|
|||
mounted = 1;
|
||||
init_volume(&volumes[volume], drive, 0);
|
||||
volume_onmount_internal(IF_MV(volume));
|
||||
|
||||
struct storage_info info;
|
||||
storage_get_info(drive, &info);
|
||||
|
||||
pinfo[0].type = PARTITION_TYPE_FAT32_LBA;
|
||||
pinfo[0].start = 0;
|
||||
pinfo[0].size = info.num_sectors;
|
||||
}
|
||||
|
||||
if (mounted == 0 && volume != -1) /* not a "superfloppy"? */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue