[syslinux:master] core, diskio: put the error code in dprintf and printable messages
syslinux-bot for H. Peter Anvin
hpa at zytor.com
Thu Jul 1 07:24:41 PDT 2010
Commit-ID: d4516833b61c52809048edcdfc25d5e610270b64
Gitweb: http://syslinux.zytor.com/commit/d4516833b61c52809048edcdfc25d5e610270b64
Author: H. Peter Anvin <hpa at zytor.com>
AuthorDate: Wed, 30 Jun 2010 09:53:46 -0700
Committer: H. Peter Anvin <hpa at zytor.com>
CommitDate: Thu, 1 Jul 2010 07:13:09 -0700
core, diskio: put the error code in dprintf and printable messages
When we print an error message to the screen, include the error
number. Furthermore, dprintf it on retries.
Signed-off-by: H. Peter Anvin <hpa at zytor.com>
---
core/fs/diskio.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/core/fs/diskio.c b/core/fs/diskio.c
index 176c5bc..b186af6 100644
--- a/core/fs/diskio.c
+++ b/core/fs/diskio.c
@@ -79,6 +79,8 @@ static int chs_rdwr_sectors(struct disk *disk, void *buf,
if (retry--)
continue;
+ dprintf("CHS: error AX = %04x\n", oreg.eax.w[0]);
+
/* For any starting value, this will always end with ..., 1, 0 */
chunk >>= 1;
if (chunk) {
@@ -87,7 +89,8 @@ static int chs_rdwr_sectors(struct disk *disk, void *buf,
ireg.eax.b[0] = chunk;
continue;
} else {
- printf("CHS: Error %s sector %llu (%u/%u/%u)\n",
+ printf("CHS: Error %04x %s sector %llu (%u/%u/%u)\n",
+ oreg.eax.w[0],
is_write ? "writing" : "reading",
lba, c, h, s+1);
}
@@ -179,6 +182,8 @@ static int edd_rdwr_sectors(struct disk *disk, void *buf,
if (retry--)
continue;
+ dprintf("EDD: error AX = %04x\n", oreg.eax.w[0]);
+
/* For any starting value, this will always end with ..., 1, 0 */
chunk >>= 1;
if (chunk) {
@@ -188,7 +193,8 @@ static int edd_rdwr_sectors(struct disk *disk, void *buf,
}
/*** XXX: Consider falling back to CHS here?! ***/
- printf("EDD: Error %s sector %llu\n",
+ printf("EDD: Error %04x %s sector %llu\n",
+ oreg.eax.w[0],
is_write ? "writing" : "reading",
lba);
return done; /* Failure */
More information about the Syslinux-commits
mailing list