[syslinux:elflink] ldlinux: fixes bug that happens when using fullpath for a COM32 module
syslinux-bot for Andre Ericson
de.ericson at gmail.com
Wed Oct 24 08:27:03 PDT 2012
Commit-ID: 7a505bfa33a2fda1d1a687ef42fe7bbf4c0f37ec
Gitweb: http://www.syslinux.org/commit/7a505bfa33a2fda1d1a687ef42fe7bbf4c0f37ec
Author: Andre Ericson <de.ericson at gmail.com>
AuthorDate: Mon, 28 May 2012 06:54:15 -0300
Committer: Andre Ericson <de.ericson at gmail.com>
CommitDate: Mon, 28 May 2012 07:19:39 -0300
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 at gmail.com>
---
com32/lib/sys/module/common.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/com32/lib/sys/module/common.c b/com32/lib/sys/module/common.c
index eeb2607..9d29075 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;
More information about the Syslinux-commits
mailing list