aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 */