summaryrefslogtreecommitdiffstats
path: root/src/hdaccess.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2010-10-24 20:30:19 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2010-10-24 20:30:19 +0200
commit7fbc038d1e62f4211aef0b0cc68d4be98f7df3a3 (patch)
treed4c9e19cbb1f828e8333ec6111660c0af91c5ecb /src/hdaccess.c
parentc9cd19d63db1dd2011370ee0bfc90ecc518f8ae2 (diff)
New prototype for size_to_unit()
Diffstat (limited to 'src/hdaccess.c')
-rw-r--r--src/hdaccess.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/hdaccess.c b/src/hdaccess.c
index e1d2538..1f1df3b 100644
--- a/src/hdaccess.c
+++ b/src/hdaccess.c
@@ -1059,8 +1059,9 @@ 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];
+ size_to_unit(disk_car->disk_size, buffer_disk_size);
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->device, 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)"));
return disk_car->description_txt;
@@ -1070,13 +1071,14 @@ static const char *file_description_short(disk_t *disk_car)
{
const struct info_file_struct *data=(const struct info_file_struct *)disk_car->data;
char buffer_disk_size[100];
+ size_to_unit(disk_car->disk_size, buffer_disk_size);
if(disk_car->model==NULL)
snprintf(disk_car->description_short_txt, sizeof(disk_car->description_txt),"Disk %s - %s%s",
- disk_car->device, size_to_unit(disk_car->disk_size,buffer_disk_size),
+ disk_car->device, buffer_disk_size,
((data->mode&O_RDWR)==O_RDWR?"":" (RO)"));
else
snprintf(disk_car->description_short_txt, sizeof(disk_car->description_txt),"Disk %s - %s%s - %s",
- disk_car->device, size_to_unit(disk_car->disk_size,buffer_disk_size),
+ disk_car->device, buffer_disk_size,
((data->mode&O_RDWR)==O_RDWR?"":" (RO)"),
disk_car->model);
return disk_car->description_short_txt;