[syslinux] [GIT-PULL] fix can't call COM32 module with full path

André Ericson de.ericson at gmail.com
Mon May 28 09:36:53 PDT 2012


Hope I got it right now. Sorry about it, still learning to use git on a
big project. Thanks for the input.

The following changes since commit 4fc3fd1e14f4c1b9208ef262e5b6aef853e9fce4:

  graphics: make use of syslinux_force_text_mode() (2012-05-19 02:05:38 -0300)

are available in the git repository at:

  git://github.com/aericson/syslinux.git elflink-for-hpa

for you to fetch changes up to d1a77419677d02e0750bb0a56d3ebe44ceb8ea2d:

  ldlinux: remove unnecessary code (2012-05-28 13:20:35 -0300)

----------------------------------------------------------------
Andre Ericson (2):
      ldlinux: fixes bug that happens when using fullpath for a COM32 module
      ldlinux: remove unnecessary code

 com32/lib/sys/module/common.c |   13 ++++---------
 core/include/fs.h             |    2 +-
 2 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/com32/lib/sys/module/common.c b/com32/lib/sys/module/common.c
index eeb2607..19742e6 100644
--- a/com32/lib/sys/module/common.c
+++ b/com32/lib/sys/module/common.c
@@ -64,6 +64,10 @@ static FILE *findpath(char *name)
    char *p, *n;
    int i;
 
+   f = fopen(name, "rb"); /* for full path */
+   if (f)
+       return f;
+
    p = PATH;
 again:
    i = 0;
@@ -74,15 +78,6 @@ again:
    if (*p == ':')
        p++;
 
-   if (path[0] == '.' && i == 1) {
-       if (!core_getcwd(path, sizeof(path))) {
-           DBG_PRINT("Could not get cwd\n");
-           return NULL;
-       }
-
-       i = strlen(path);
-   }
-
    n = name;
    while (*n && i < FILENAME_MAX)
        path[i++] = *n++;
diff --git a/core/include/fs.h b/core/include/fs.h
index 40ca09a..01b6d57 100644
--- a/core/include/fs.h
+++ b/core/include/fs.h
@@ -179,7 +179,7 @@ static inline struct file *handle_to_file(uint16_t handle)
     return handle ? &files[handle-1] : NULL;
 }
 
-#define PATH_DEFAULT   ".:/boot/syslinux/:/boot/"
+#define PATH_DEFAULT   "/boot/syslinux/:/boot/"
 extern char *PATH;
 
 /* fs.c */



More information about the Syslinux mailing list