From 29d560e6bb11bc4a9171e1e70c9f282bf7cb6895 Mon Sep 17 00:00:00 2001 From: Gene Cumm Date: Sat, 26 Jun 2010 11:18:59 -0400 Subject: [PATCH] Fix COM32 chdir() Fix COM32 chdir() since it's implemented in the core. Forgot the core changes needed for this before. Signed-off-by: Gene Cumm Signed-off-by: H. Peter Anvin --- com32/include/syslinux/pmapi.h | 2 ++ com32/lib/chdir.c | 10 ++++------ core/pmapi.c | 2 ++ 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/com32/include/syslinux/pmapi.h b/com32/include/syslinux/pmapi.h index ae3254d..f1036df 100644 --- a/com32/include/syslinux/pmapi.h +++ b/com32/include/syslinux/pmapi.h @@ -67,6 +67,8 @@ struct com32_pmapi { void (*idle)(void); void (*reset_idle)(void); + + int (*chdir)(const char *); }; #endif /* _SYSLINUX_PMAPI_H */ diff --git a/com32/lib/chdir.c b/com32/lib/chdir.c index 6a365f3..00670e3 100644 --- a/com32/lib/chdir.c +++ b/com32/lib/chdir.c @@ -6,12 +6,10 @@ #include #include +#include +#include + int chdir(const char *path) { - /* Actually implement something here... */ - - (void)path; - - errno = ENOSYS; - return -1; + return __com32.cs_pm->chdir(path); } diff --git a/core/pmapi.c b/core/pmapi.c index f3a0c16..18693d9 100644 --- a/core/pmapi.c +++ b/core/pmapi.c @@ -34,4 +34,6 @@ const struct com32_pmapi pm_api_vector = .idle = __idle, .reset_idle = reset_idle, + + .chdir = chdir, }; -- 2.7.4