[syslinux] [PATCH] Fix COM32 chdir()
Gene Cumm
gene.cumm at gmail.com
Sat Jun 26 08:18:59 PDT 2010
From: Gene Cumm <gene.cumm at gmail.com>
Fix COM32 chdir() since it's implemented in the core.
Signed-off-by: Gene Cumm <gene.cumm at gmail.com>
Forgot the core changes needed for this before.
---
diff --git a/com32/include/syslinux/pmapi.h b/com32/include/syslinux/pmapi.h
index f583dea..6a32d3c 100644
--- a/com32/include/syslinux/pmapi.h
+++ b/com32/include/syslinux/pmapi.h
@@ -65,6 +66,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 <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 3313cea..aaa3c78 100644
--- a/core/pmapi.c
+++ b/core/pmapi.c
@@ -32,4 +32,6 @@ const struct com32_pmapi pm_api_vector =
.idle = __idle,
.reset_idle = reset_idle,
+
+ .chdir = chdir,
};
More information about the Syslinux
mailing list