summaryrefslogtreecommitdiffstats
path: root/src/ewf.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2008-07-18 22:16:08 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2008-07-18 22:16:08 +0200
commit8585ef8e51b492783c7d4a3125beeacac1d4314a (patch)
treeec8cbc98265f903e2ca2063b78f93eb3c358ad23 /src/ewf.c
parentcc3bc11be8d37123b2165510fe510c8ca5944385 (diff)
Store disk geometry in cylinders/heads_per_cylinder/sectors_per_head instead of CHS
Diffstat (limited to 'src/ewf.c')
-rw-r--r--src/ewf.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/ewf.c b/src/ewf.c
index c4498c5..57b6b85 100644
--- a/src/ewf.c
+++ b/src/ewf.c
@@ -149,9 +149,9 @@ disk_t *fewf_init(const char *device, const int verbose, const arch_fnct_t *arch
if(disk_car->sector_size==0)
disk_car->sector_size=DEFAULT_SECTOR_SIZE;
/* Set geometry */
- disk_car->CHS.cylinder=0;
- disk_car->CHS.head=0;
- disk_car->CHS.sector=1;
+ disk_car->geom.cylinders=0;
+ disk_car->geom.heads_per_cylinder=1;
+ disk_car->geom.sectors_per_head=1;
/* Get disk_real_size */
#ifdef LIBEWF_GET_MEDIA_SIZE_HAVE_TWO_ARGUMENTS
{
@@ -178,7 +178,8 @@ static const char *fewf_description(disk_t *disk_car)
char buffer_disk_size[100];
snprintf(disk_car->description_txt, sizeof(disk_car->description_txt),"Image %s - %s - CHS %u %u %u%s",
data->file_name, size_to_unit(disk_car->disk_size,buffer_disk_size),
- disk_car->CHS.cylinder+1, disk_car->CHS.head+1, disk_car->CHS.sector,((data->mode&O_RDWR)==O_RDWR?"":" (RO)"));
+ disk_car->geom.cylinders, disk_car->geom.heads_per_cylinder, disk_car->geom.sectors_per_head,
+ ((data->mode&O_RDWR)==O_RDWR?"":" (RO)"));
return disk_car->description_txt;
}