mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-05 12:56:08 +00:00
loader: bioscd probe can get sector size 0
With buggy BIOS, it may happen we get sector size reported 0 for cd, and then the default 512 is used, which is quite wrong. PR: 238749
This commit is contained in:
parent
57e642365b
commit
20698d1531
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=356570
@ -396,7 +396,8 @@ bc_add(int biosdev)
|
|||||||
return (-1);
|
return (-1);
|
||||||
|
|
||||||
bd->bd_flags = BD_CDROM;
|
bd->bd_flags = BD_CDROM;
|
||||||
bd->bd_unit = biosdev;
|
bd->bd_unit = biosdev;
|
||||||
|
bd->bd_sectorsize = 2048;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Ignore result from bd_int13probe(), we will use local
|
* Ignore result from bd_int13probe(), we will use local
|
||||||
@ -564,7 +565,8 @@ bd_int13probe(bdinfo_t *bd)
|
|||||||
bd->bd_flags |= BD_MODEEDD3;
|
bd->bd_flags |= BD_MODEEDD3;
|
||||||
|
|
||||||
/* Default sector size */
|
/* 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
|
* Test if the floppy device is present, so we can avoid receiving
|
||||||
|
Loading…
Reference in New Issue
Block a user