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> --- diff --git a/com32/lib/chdir.c b/com32/lib/chdir.c index 6a365f3..4bd4c84 100644 --- a/com32/lib/chdir.c +++ b/com32/lib/chdir.c @@ -8,10 +8,5 @@ int chdir(const char *path) { - /* Actually implement something here... */ - - (void)path; - - errno = ENOSYS; - return -1; + return __com32.cs_pm->chdir(path); }
please disregard for now. On Sat, Jun 26, 2010 at 09:19, Gene Cumm <gene.cumm at gmail.com> wrote:> 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> > > --- > > diff --git a/com32/lib/chdir.c b/com32/lib/chdir.c > index 6a365f3..4bd4c84 100644 > --- a/com32/lib/chdir.c > +++ b/com32/lib/chdir.c > @@ -8,10 +8,5 @@ > > ?int chdir(const char *path) > ?{ > - ? ?/* Actually implement something here... */ > - > - ? ?(void)path; > - > - ? ?errno = ENOSYS; > - ? ?return -1; > + ? ?return __com32.cs_pm->chdir(path); > ?} >-- -Gene "No one ever says, 'I can't read that ASCII(plain text) e-mail you sent me.'"
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, };