mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2024-12-22 20:31:14 +00:00
GPT entry LBA range is inclusive
This commit is contained in:
parent
85bfbeccc3
commit
858b40e5fb
1 changed files with 1 additions and 1 deletions
|
@ -163,7 +163,7 @@ static int switchfs_mount_partition_gpt_callback(const efi_entry_t *entry, void
|
||||||
for (size_t i = 0; i < sizeof(known_partitions)/sizeof(known_partitions[0]); i++) {
|
for (size_t i = 0; i < sizeof(known_partitions)/sizeof(known_partitions[0]); i++) {
|
||||||
if (strcmp(name_buffer, known_partitions[i].partition_name) == 0) {
|
if (strcmp(name_buffer, known_partitions[i].partition_name) == 0) {
|
||||||
devpart.start_sector += entry->first_lba;
|
devpart.start_sector += entry->first_lba;
|
||||||
devpart.num_sectors = entry->last_lba - entry->first_lba;
|
devpart.num_sectors = (entry->last_lba + 1) - entry->first_lba;
|
||||||
if (parent->num_sectors < devpart.num_sectors) {
|
if (parent->num_sectors < devpart.num_sectors) {
|
||||||
errno = EINVAL;
|
errno = EINVAL;
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Reference in a new issue