From: Pierre-Alexandre Meyer Date: Sat, 9 May 2009 02:12:21 +0000 (-0700) Subject: hdt: Silence harmless errors when detecting disks X-Git-Tag: syslinux-3.83-pre8~5^2~24^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=98d010375584121be6e9b09bdae92258911585a7;p=profile%2Fivi%2Fsyslinux.git 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 --- 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) {