summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGene Cumm <gene.cumm@gmail.com>2010-06-26 11:18:59 -0400
committerH. Peter Anvin <hpa@zytor.com>2010-06-26 12:31:28 -0700
commit29d560e6bb11bc4a9171e1e70c9f282bf7cb6895 (patch)
tree209f5dbf87b38bbf3d4c289f18740f29d89a5d1d
parent3547a45e6d81e82cbdee266fc6b6186fb189e9ea (diff)
downloadsyslinux-29d560e6bb11bc4a9171e1e70c9f282bf7cb6895.tar.gz
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 <gene.cumm@gmail.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-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,
};