static block_dev_desc_t *cur_dev = NULL;
static unsigned long part_offset = 0;
-static unsigned long next_part_offset = 0;
+static unsigned long part_size = 0;
static int cur_part = 1;
if (!get_partition_info(dev_desc, part_no, &info)) {
part_offset = info.start;
cur_part = part_no;
-
- if (!get_partition_info(dev_desc, part_no + 1, &info))
- next_part_offset = info.start;
+ part_size = info.size;
} else if ((strncmp((char *)&buffer[DOS_FS_TYPE_OFFSET], "FAT", 3) == 0) ||
(strncmp((char *)&buffer[DOS_FS32_TYPE_OFFSET], "FAT32", 5) == 0)) {
/* ok, we assume we are on a PBR only */
total_sector = bs.total_sect;
if (total_sector == 0) {
- total_sector = next_part_offset - part_offset;
+ total_sector = part_size;
}
root_cluster = bs.root_cluster;
total_sector = bs.total_sect;
if (total_sector == 0) {
- total_sector = next_part_offset - part_offset;
+ total_sector = part_size;
}
if (mydata->fatsize == 32)
if (!get_partition_info(dev_desc, part_no, &info)) {
volume_size_bytes = info.size * info.blksz;
- volume_size_sect = volume_size_bytes / bytes_per_sect;
+ volume_size_sect = info.size;
total_sector = volume_size_sect;
} else {