summaryrefslogtreecommitdiffstats
path: root/src/hdaccess.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2009-04-12 11:49:36 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2009-04-12 11:49:36 +0200
commit480320fe82922296d6c181ddcc95fbf5cf566330 (patch)
treebe77470b892dd3fae623c9f677e7f752a860e283 /src/hdaccess.c
parent062da3696d295e903d2e3e97d225c6794653b597 (diff)
Cylinder is now long unsigned int. Fix a parameter inversion for the DOS version.
Diffstat (limited to 'src/hdaccess.c')
-rw-r--r--src/hdaccess.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/hdaccess.c b/src/hdaccess.c
index acae010..61519e7 100644
--- a/src/hdaccess.c
+++ b/src/hdaccess.c
@@ -756,13 +756,13 @@ void update_disk_car_fields(disk_t *disk_car)
}
else
{
- const unsigned int cylinder_num=disk_car->disk_real_size /
+ const unsigned long int cylinder_num=disk_car->disk_real_size /
(uint64_t)disk_car->geom.heads_per_cylinder /
(uint64_t)disk_car->geom.sectors_per_head /
(uint64_t)disk_car->sector_size;
if(cylinder_num>0 && disk_car->geom.cylinders != cylinder_num)
{
- log_debug("Fix cylinder count for %s: number of cylinders %u != %u (calculated)\n",
+ log_debug("Fix cylinder count for %s: number of cylinders %lu != %lu (calculated)\n",
disk_car->device, disk_car->geom.cylinders, cylinder_num);
disk_car->geom.cylinders = cylinder_num;
}
@@ -1023,7 +1023,7 @@ static const char *file_description(disk_t *disk_car)
{
const struct info_file_struct *data=(const struct info_file_struct *)disk_car->data;
char buffer_disk_size[100];
- snprintf(disk_car->description_txt, sizeof(disk_car->description_txt),"Disk %s - %s - CHS %u %u %u%s",
+ snprintf(disk_car->description_txt, sizeof(disk_car->description_txt),"Disk %s - %s - CHS %lu %u %u%s",
disk_car->device, size_to_unit(disk_car->disk_size,buffer_disk_size),
disk_car->geom.cylinders, disk_car->geom.heads_per_cylinder, disk_car->geom.sectors_per_head,
((data->mode&O_RDWR)==O_RDWR?"":" (RO)"));