aboutsummaryrefslogtreecommitdiffstats
path: root/core/fs/lib/searchconfig.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2012-06-28 19:33:16 -0700
committerH. Peter Anvin <hpa@zytor.com>2012-06-28 19:33:16 -0700
commit15cbfdfd390402057d237664ac087140608bf80b (patch)
treebe6d0d99b2c360d400c4d664c37a28a7254b21ba /core/fs/lib/searchconfig.c
parent255fd8e592d2fb014e4a13a98655aed0bf9d6121 (diff)
downloadsyslinux-15cbfdfd390402057d237664ac087140608bf80b.tar.gz
syslinux-15cbfdfd390402057d237664ac087140608bf80b.tar.xz
syslinux-15cbfdfd390402057d237664ac087140608bf80b.zip
Actually keep track of the pathnames for all elementssyslinux-4.06-pre9
Actually keep track of the pathnames for all elements for on-disk filesystems. This makes sure we can always reconstruct the correct path. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'core/fs/lib/searchconfig.c')
-rw-r--r--core/fs/lib/searchconfig.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/fs/lib/searchconfig.c b/core/fs/lib/searchconfig.c
index 24bfde31..f18836a8 100644
--- a/core/fs/lib/searchconfig.c
+++ b/core/fs/lib/searchconfig.c
@@ -25,7 +25,8 @@ int search_config(const char *search_directories[], const char *filenames[])
"%s%s%s",
sd, (*sd && sd[strlen(sd)-1] == '/') ? "" : "/",
sf);
- realpath(ConfigName, confignamebuf, FILENAME_MAX);
+ if (realpath(ConfigName, confignamebuf, FILENAME_MAX) == (size_t)-1)
+ continue;
regs.edi.w[0] = OFFS_WRT(ConfigName, 0);
dprintf("Config search: %s\n", ConfigName);
call16(core_open, &regs, &regs);