From 570479901769888c6a35dcd8d94242a926d0bd87 Mon Sep 17 00:00:00 2001 From: Toomas Soome Date: Fri, 3 Aug 2018 08:03:31 +0300 Subject: [PATCH] 9699 loader: biosdisk should prefer smaller (safer) sectors value from INT13 Reviewed by: Andy Fiddaman Reviewed by: Yuri Pankov Approved by: Robert Mustacchi --- usr/src/boot/sys/boot/i386/libi386/biosdisk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr/src/boot/sys/boot/i386/libi386/biosdisk.c b/usr/src/boot/sys/boot/i386/libi386/biosdisk.c index 6218465960..598cef6814 100644 --- a/usr/src/boot/sys/boot/i386/libi386/biosdisk.c +++ b/usr/src/boot/sys/boot/i386/libi386/biosdisk.c @@ -269,7 +269,7 @@ bd_int13probe(struct bdinfo *bd) total = (uint64_t)params.cylinders * params.heads * params.sectors_per_track; - if (bd->bd_sectors < total) + if (total > 0 && bd->bd_sectors > total) bd->bd_sectors = total; ret = 1; -- 2.11.4.GIT