summaryrefslogtreecommitdiffstats
path: root/src/godmode.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2011-12-08 09:00:52 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2011-12-08 09:00:52 +0100
commit7943d695f9470e39fd2ff75c83941ec6f47f577d (patch)
tree90cb489b3ff5a00f09addb2b7a54f2e8c54203b5 /src/godmode.c
parent01fc5101b70cba8e095f36809488b11e361a8412 (diff)
Remove "Allow partial last cylinder" option
Diffstat (limited to 'src/godmode.c')
-rw-r--r--src/godmode.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/godmode.c b/src/godmode.c
index eff5d8b..0da8d32 100644
--- a/src/godmode.c
+++ b/src/godmode.c
@@ -389,8 +389,6 @@ static list_part_t *search_part(disk_t *disk_car, const list_part_t *list_part_o
((uint64_t) disk_car->geom.heads_per_cylinder * disk_car->geom.sectors_per_head * disk_car->sector_size) + 1 ) *
((uint64_t) disk_car->geom.heads_per_cylinder * disk_car->geom.sectors_per_head * disk_car->sector_size),
disk_car->disk_real_size);
- const uint64_t max_disk_size_for_partition=td_max(disk_car->disk_size,
- (uint64_t)disk_car->geom.cylinders*disk_car->geom.heads_per_cylinder * disk_car->geom.sectors_per_head * disk_car->sector_size);
partition=partition_new(disk_car->arch);
buffer_disk=(unsigned char*)MALLOC(16*DEFAULT_SECTOR_SIZE);
buffer_disk0=(unsigned char*)MALLOC(16*DEFAULT_SECTOR_SIZE);
@@ -766,7 +764,7 @@ static list_part_t *search_part(disk_t *disk_car, const list_part_t *list_part_o
/* TODO: Detect Linux md 1.0 software raid */
}
/* */
- if(pos_fin <= max_disk_size_for_partition)
+ if(pos_fin <= search_location_max)
{
{
int insert_error=0;
@@ -868,7 +866,7 @@ static list_part_t *search_part(disk_t *disk_car, const list_part_t *list_part_o
partition->status=STATUS_DELETED;
if(disk_car->arch->is_part_known(partition)!=0 && partition->part_size>1 &&
partition->part_offset >= min_location &&
- partition->part_offset+partition->part_size-1 <= max_disk_size_for_partition)
+ partition->part_offset+partition->part_size-1 <= search_location_max)
{
int insert_error=0;
partition_t *new_partition=partition_new(NULL);