diff options
author | Erwan Velu <erwan.velu@free.fr> | 2009-11-29 14:38:43 +0100 |
---|---|---|
committer | Erwan Velu <erwan.velu@free.fr> | 2009-12-04 10:11:15 +0100 |
commit | adbc06e2c0d4e65b13492a80a6ebc0f3c855cfba (patch) | |
tree | 2ddd8d56461b5eb80042e2b4b658e5dbd4c08d15 /com32/hdt/hdt-cli-disk.c | |
parent | c08eba77232a2c69c4312c203ddf86330d2214a1 (diff) | |
download | hdt-adbc06e2c0d4e65b13492a80a6ebc0f3c855cfba.tar.gz hdt-adbc06e2c0d4e65b13492a80a6ebc0f3c855cfba.tar.xz hdt-adbc06e2c0d4e65b13492a80a6ebc0f3c855cfba.zip |
hdt: Do not display hostbus & interface for EDD<3
Impact: Avoid corruption while displaying host bus interface when
EDD<3.0
If EDD < 3.0 displaying host bus & interface for disk devices return
unexpected content. We have to avoid displaying that informations in
such case
Diffstat (limited to 'com32/hdt/hdt-cli-disk.c')
-rw-r--r-- | com32/hdt/hdt-cli-disk.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/com32/hdt/hdt-cli-disk.c b/com32/hdt/hdt-cli-disk.c index cabee9de..a766ab83 100644 --- a/com32/hdt/hdt-cli-disk.c +++ b/com32/hdt/hdt-cli-disk.c @@ -212,9 +212,12 @@ void disks_summary(int argc __unused, char **argv __unused, d->legacy_sectors_per_track); more_printf(" EDD: Version: %X, size: %s\n", d->edd_version, disk_size); - more_printf(" Host bus: %s, Interface type: %s\n\n", - remove_spaces((char *)d->edd_params.host_bus_type), - remove_spaces((char *)d->edd_params.interface_type)); + + /* Do not print Host Bus & Interface if EDD isn't 3.0 or more */ + if (d->edd_version >= 30) + more_printf(" Host bus: %s, Interface type: %s\n\n", + remove_spaces((char *)d->edd_params.host_bus_type), + remove_spaces((char *)d->edd_params.interface_type)); } if (found == false) |