Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F137882879
D10032.id26336.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D10032.id26336.diff
View Options
Index: head/sys/boot/i386/libi386/biosdisk.c
===================================================================
--- head/sys/boot/i386/libi386/biosdisk.c
+++ head/sys/boot/i386/libi386/biosdisk.c
@@ -559,7 +559,7 @@
{
struct disk_devdesc *dev = (struct disk_devdesc *)devdata;
uint64_t disk_blocks;
- int blks;
+ int blks, rc;
#ifdef BD_SUPPORT_FRAGS /* XXX: sector size */
char fragbuf[BIOSDISK_SECSIZE];
size_t fragsize;
@@ -616,8 +616,12 @@
case F_READ:
DEBUG("read %d from %lld to %p", blks, dblk, buf);
- if (blks && bd_read(dev, dblk, blks, buf)) {
- DEBUG("read error");
+ if (blks && (rc = bd_read(dev, dblk, blks, buf))) {
+ /* Filter out floppy controller errors */
+ if (BD(dev).bd_flags != BD_FLOPPY || rc != 0x20) {
+ printf("read %d from %lld to %p, error: 0x%x", blks, dblk,
+ buf, rc);
+ }
return (EIO);
}
#ifdef BD_SUPPORT_FRAGS /* XXX: sector size */
@@ -676,7 +680,9 @@
v86.ds = VTOPSEG(&packet);
v86.esi = VTOPOFF(&packet);
v86int();
- return (V86_CY(v86.efl));
+ if (V86_CY(v86.efl))
+ return (v86.eax >> 8);
+ return (0);
}
static int
@@ -710,7 +716,9 @@
v86.es = VTOPSEG(dest);
v86.ebx = VTOPOFF(dest);
v86int();
- return (V86_CY(v86.efl));
+ if (V86_CY(v86.efl))
+ return (v86.eax >> 8);
+ return (0);
}
static int
@@ -797,7 +805,7 @@
DEBUG("Read %d sector(s) from %lld to %p (0x%x) %s", x,
dblk, p, VTOP(p), result ? "failed" : "ok");
if (result) {
- return(-1);
+ return (result);
}
if (!write && bbuf != NULL)
bcopy(bbuf, p, x * BD(dev).bd_sectorsize);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Nov 27, 8:34 PM (13 h, 27 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
26261963
Default Alt Text
D10032.id26336.diff (1 KB)
Attached To
Mode
D10032: loader: biosdisk should report IO error from INT13
Attached
Detach File
Event Timeline
Log In to Comment