aboutsummaryrefslogtreecommitdiffstats
path: root/com32/hdt/hdt-cli-disk.c
diff options
context:
space:
mode:
authorErwan Velu <erwan.velu@free.fr>2009-11-29 14:07:52 +0100
committerErwan Velu <erwan.velu@free.fr>2009-12-04 10:11:15 +0100
commit16e3c1c438479d89ab270fd8ea672d5680e7ee52 (patch)
tree464929b20d190a8f69d7574ec67596433d7ca88d /com32/hdt/hdt-cli-disk.c
parente8abe5be27038b92d8c40c1762a905249f1f9268 (diff)
downloadhdt-16e3c1c438479d89ab270fd8ea672d5680e7ee52.tar.gz
hdt-16e3c1c438479d89ab270fd8ea672d5680e7ee52.tar.xz
hdt-16e3c1c438479d89ab270fd8ea672d5680e7ee52.zip
hdt: Preventing agressive disk's size rounding
Impact: Visual Prevent reported case where 1997MB could be displayed as 1GB.
Diffstat (limited to 'com32/hdt/hdt-cli-disk.c')
-rw-r--r--com32/hdt/hdt-cli-disk.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/com32/hdt/hdt-cli-disk.c b/com32/hdt/hdt-cli-disk.c
index 290940c1..cabee9de 100644
--- a/com32/hdt/hdt-cli-disk.c
+++ b/com32/hdt/hdt-cli-disk.c
@@ -55,7 +55,7 @@ static void show_partition_information(struct driveinfo *drive_info,
int partition_offset,
int nb_partitions_seen)
{
- char size[9];
+ char size[11];
char bootloader_name[9];
char *parttype;
unsigned int start, end;
@@ -108,7 +108,7 @@ void main_show_disk(int argc, char **argv, struct s_hardware *hardware)
int i = drive - 0x80;
struct driveinfo *d = &hardware->disk_info[i];
- char disk_size[9];
+ char disk_size[11];
char mbr_name[50];
detect_disks(hardware);
@@ -199,7 +199,7 @@ void disks_summary(int argc __unused, char **argv __unused,
found = true;
struct driveinfo *d = &hardware->disk_info[i];
- char disk_size[9];
+ char disk_size[11];
if ((int)d->edd_params.sectors > 0)
sectors_to_size((int)d->edd_params.sectors, disk_size);