From 98d010375584121be6e9b09bdae92258911585a7 Mon Sep 17 00:00:00 2001 From: Pierre-Alexandre Meyer Date: Fri, 8 May 2009 19:12:21 -0700 Subject: [PATCH] hdt: Silence harmless errors when detecting disks Detecting disk geometry can fail either because the extension query failed (invalid disk number?) or because the legacy geometry call failed (int 13 not supported?). The latter happens for instance when querying geometry for CDROMs. In either case, the error message is not meaningful. Don't print it (and don't confuse the user). (Impact: fixes #5) Signed-off-by: Pierre-Alexandre Meyer --- com32/hdt/hdt-common.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/com32/hdt/hdt-common.c b/com32/hdt/hdt-common.c index 987c5ae..0f98ab9 100644 --- a/com32/hdt/hdt-common.c +++ b/com32/hdt/hdt-common.c @@ -263,8 +263,11 @@ void detect_disks(struct s_hardware *hardware) hardware->disk_info[i].disk = drive; err = get_drive_parameters(&hardware->disk_info[i]); - /* Do not print output when drive does not exists */ - if (err == -1) + /* + * Do not print output when drive does not exist or + * doesn't support int13 (cdrom, ...) + */ + if (err == -1 || !hardware->disk_info[i].cbios) continue; if (err) { -- 2.7.4