aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--com32/include/syslinux/pmapi.h2
-rw-r--r--com32/lib/chdir.c10
-rw-r--r--core/pmapi.c2
3 files changed, 8 insertions, 6 deletions
diff --git a/com32/include/syslinux/pmapi.h b/com32/include/syslinux/pmapi.h
index ae3254df..f1036dfd 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 6a365f3b..00670e35 100644
--- a/com32/lib/chdir.c
+++ b/com32/lib/chdir.c
@@ -6,12 +6,10 @@
#include <stdio.h>
#include <errno.h>
+#include <com32.h>
+#include <syslinux/pmapi.h>
+
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 f3a0c167..18693d97 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,
};