From 3547a45e6d81e82cbdee266fc6b6186fb189e9ea Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Sat, 26 Jun 2010 12:30:13 -0700 Subject: [PATCH] pmapi: make the pmapi vector include its own size Future-proof the pmapi vector by making it include its own size. Signed-off-by: H. Peter Anvin --- com32/include/syslinux/pmapi.h | 2 ++ core/pmapi.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/com32/include/syslinux/pmapi.h b/com32/include/syslinux/pmapi.h index f583dea..ae3254d 100644 --- a/com32/include/syslinux/pmapi.h +++ b/com32/include/syslinux/pmapi.h @@ -52,6 +52,8 @@ struct com32_filedata { }; struct com32_pmapi { + size_t __pmapi_size; + void *(*lmalloc)(size_t); void (*lfree)(void *); diff --git a/core/pmapi.c b/core/pmapi.c index 3313cea..f3a0c16 100644 --- a/core/pmapi.c +++ b/core/pmapi.c @@ -19,6 +19,8 @@ const struct com32_pmapi pm_api_vector = { + .__pmapi_size = sizeof(struct com32_pmapi), + .lmalloc = pmapi_lmalloc, /* Allocate low memory */ .lfree = free, /* Free low memory */ -- 2.7.4