[syslinux:master] diskio: add reminder that we need clear in the future

syslinux-bot for H. Peter Anvin hpa at linux.intel.com
Mon Jan 17 11:51:50 PST 2011


Commit-ID:  435b86cb288b9020d66ddd82c41bda14a4df5ccc
Gitweb:     http://syslinux.zytor.com/commit/435b86cb288b9020d66ddd82c41bda14a4df5ccc
Author:     H. Peter Anvin <hpa at linux.intel.com>
AuthorDate: Mon, 17 Jan 2011 11:48:55 -0800
Committer:  H. Peter Anvin <hpa at linux.intel.com>
CommitDate: Mon, 17 Jan 2011 11:48:55 -0800

diskio: add reminder that we need clear in the future

Currently, disk_init() can only be called once, and edd_params get
statically initialized to zero.  This will change once this function
can be called more than once, and we depend on the pre-initialization
to zero to avoid known BIOS bugs.

Signed-off-by: H. Peter Anvin <hpa at linux.intel.com>


---
 core/fs/diskio.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/core/fs/diskio.c b/core/fs/diskio.c
index 38d3da3..06bbe4f 100644
--- a/core/fs/diskio.c
+++ b/core/fs/diskio.c
@@ -354,6 +354,9 @@ struct disk *disk_init(uint8_t devno, bool cdrom, sector_t part_start,
 	    hard_max_transfer = 127;
 
 	    /* Query EBIOS parameters */
+	    /* The memset() is needed once this function can be called
+	       more than once */
+	    /* memset(&edd_params, 0, sizeof edd_params);  */
 	    edd_params.len = sizeof edd_params;
 
 	    ireg.eax.b[1] = 0x48;



More information about the Syslinux-commits mailing list