fdisk: ignore 0 endsecotor for partition geometry discovery
This commit is contained in:
parent
ad14ea30b0
commit
a2e26ffd4c
1 changed files with 1 additions and 1 deletions
|
@ -113,7 +113,7 @@ partitiongeometry(Disk *disk)
|
|||
}
|
||||
}
|
||||
|
||||
if(h == -1)
|
||||
if(h < 0 || s <= 0)
|
||||
return -1;
|
||||
|
||||
disk->h = h+1; /* heads count from 0 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue