Avoid a division by zero when a value of 0 cylinder is returned.
This commit is contained in:
parent
097c15512e
commit
3277ff9045
1 changed files with 2 additions and 0 deletions
|
@ -769,6 +769,8 @@ void update_disk_car_fields(disk_t *disk_car)
|
||||||
disk_car->geom.cylinders = cylinder_num;
|
disk_car->geom.cylinders = cylinder_num;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(disk_car->geom.cylinders == 0)
|
||||||
|
disk_car->geom.cylinders++;
|
||||||
disk_car->disk_size=disk_car->disk_real_size;
|
disk_car->disk_size=disk_car->disk_real_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue