summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2010-01-25 15:00:38 -0800
committerH. Peter Anvin <hpa@zytor.com>2010-01-25 15:00:38 -0800
commitd0a8343ebe29573f92f6a33abcbfe7415bf4e2cf (patch)
tree6e43a7d16428e74ebd67bba0832848033405911e
parent413a70918e18bcdf1922583ed7a1c79ccbe4a4b7 (diff)
downloadsyslinux-d0a8343ebe29573f92f6a33abcbfe7415bf4e2cf.tar.gz
openmem: fix openmem()syslinux-4.00-pre11
Correct the implementation of openmem(). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r--com32/lib/sys/openmem.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/com32/lib/sys/openmem.c b/com32/lib/sys/openmem.c
index 13a45c2a..33b8de0d 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 */