changeset 24464:655977663183

12177 loader: bioscd probe can get sector size 0 Reviewed by: John Levon <john.levon@joyent.com> Approved by: Robert Mustacchi <rm@fingolfin.org>
author Toomas Soome <tsoome@me.com>
date Thu, 09 Jan 2020 19:11:36 +0200
parents b2ca80b6ab03
children 9b7150239e63
files usr/src/boot/Makefile.version usr/src/boot/sys/boot/i386/libi386/biosdisk.c
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/boot/Makefile.version	Wed Dec 11 01:15:55 2019 +0000
+++ b/usr/src/boot/Makefile.version	Thu Jan 09 19:11:36 2020 +0200
@@ -33,4 +33,4 @@
 # Use date like formatting here, YYYY.MM.DD.XX, without leading zeroes.
 # The version is processed from left to right, the version number can only
 # be increased.
-BOOT_VERSION = $(LOADER_VERSION)-2020.01.06.1
+BOOT_VERSION = $(LOADER_VERSION)-2020.01.09.1
--- a/usr/src/boot/sys/boot/i386/libi386/biosdisk.c	Wed Dec 11 01:15:55 2019 +0000
+++ b/usr/src/boot/sys/boot/i386/libi386/biosdisk.c	Thu Jan 09 19:11:36 2020 +0200
@@ -392,6 +392,7 @@
 
 	bd->bd_flags = BD_CDROM;
 	bd->bd_unit = biosdev;
+	bd->bd_sectorsize = 2048;
 
 	/*
 	 * Ignore result from bd_int13probe(), we will use local
@@ -559,7 +560,8 @@
 		bd->bd_flags |= BD_MODEEDD3;
 
 	/* Default sector size */
-	bd->bd_sectorsize = BIOSDISK_SECSIZE;
+	if (bd->bd_sectorsize == 0)
+		bd->bd_sectorsize = BIOSDISK_SECSIZE;
 
 	/*
 	 * Test if the floppy device is present, so we can avoid receiving