aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Ericson <de.ericson@gmail.com>2012-05-28 06:54:15 -0300
committerAndre Ericson <de.ericson@gmail.com>2012-05-28 07:19:39 -0300
commit7a505bfa33a2fda1d1a687ef42fe7bbf4c0f37ec (patch)
tree3166ea31a1631ef39c13ec1192f1ec6064b5a910
parent2779b713bdd8644ee2b52962ece6daa209b4ba6b (diff)
downloadsyslinux-7a505bfa33a2fda1d1a687ef42fe7bbf4c0f37ec.tar.gz
syslinux-7a505bfa33a2fda1d1a687ef42fe7bbf4c0f37ec.tar.xz
syslinux-7a505bfa33a2fda1d1a687ef42fe7bbf4c0f37ec.zip
ldlinux: fixes bug that happens when using fullpath for a COM32 module
When using full path for a com32 module, for example, /boot/syslinux/ls.c32 it fails without any error message this patch fixes it by looking first if the argv[0] is the path to a module before looking for it at PATH Signed-off-by: Andre Ericson <de.ericson@gmail.com>
-rw-r--r--com32/lib/sys/module/common.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/com32/lib/sys/module/common.c b/com32/lib/sys/module/common.c
index eeb26075..9d290751 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;