[syslinux:fsc] openmem: fix openmem()

syslinux-bot for H. Peter Anvin hpa at zytor.com
Mon Jan 25 15:03:02 PST 2010


Commit-ID:  d0a8343ebe29573f92f6a33abcbfe7415bf4e2cf
Gitweb:     http://syslinux.zytor.com/commit/d0a8343ebe29573f92f6a33abcbfe7415bf4e2cf
Author:     H. Peter Anvin <hpa at zytor.com>
AuthorDate: Mon, 25 Jan 2010 15:00:38 -0800
Committer:  H. Peter Anvin <hpa at zytor.com>
CommitDate: Mon, 25 Jan 2010 15:00:38 -0800

openmem: fix openmem()

Correct the implementation of openmem().

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


---
 com32/lib/sys/openmem.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/com32/lib/sys/openmem.c b/com32/lib/sys/openmem.c
index 13a45c2..33b8de0 100644
--- a/com32/lib/sys/openmem.c
+++ b/com32/lib/sys/openmem.c
@@ -42,7 +42,6 @@ const struct input_dev __file_dev;
 
 int openmem(const void *base, size_t len, int flags)
 {
-    com32sys_t regs;
     int fd;
     struct file_info *fp;
 
@@ -51,6 +50,8 @@ int openmem(const void *base, size_t len, int flags)
     if (fd < 0)
 	return -1;
 
+    fp = &__file_info[fd];
+
     fp->i.length  = fp->i.nbytes = len;
     fp->i.datap   = (void *)base;
     fp->i.filedes = 0;		/* No actual file */



More information about the Syslinux-commits mailing list