diff options
author | Matt Fleming <matt.fleming@intel.com> | 2012-11-30 09:50:53 +0000 |
---|---|---|
committer | Matt Fleming <matt.fleming@intel.com> | 2012-11-30 11:04:23 +0000 |
commit | 10bb72d1528b909a8e6f270fca02e6b5afae6a6e (patch) | |
tree | 443d36c8ad043c5417fc323712210b55c7506d86 | |
parent | 163b8b1a7aabad440e824c64e51c19709cd0a529 (diff) | |
download | syslinux-10bb72d1528b909a8e6f270fca02e6b5afae6a6e.tar.gz syslinux-10bb72d1528b909a8e6f270fca02e6b5afae6a6e.tar.xz syslinux-10bb72d1528b909a8e6f270fca02e6b5afae6a6e.zip |
PATH: Use installation directory for 'PATH'
Files in the installation directory should be able to be executed
(along with their dependencies) from any directory in the file
hierarchy. Using the installation directory as the default value for
'PATH' is the most sensible way to do this.
The PATH config directive still allows other directories to be
appended to the 'PATH' variable, which is useful when there are other
directories containing modules.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
-rw-r--r-- | core/elflink/load_env32.c | 5 | ||||
-rw-r--r-- | core/include/fs.h | 1 |
2 files changed, 2 insertions, 4 deletions
diff --git a/core/elflink/load_env32.c b/core/elflink/load_env32.c index a4bee754..4797b270 100644 --- a/core/elflink/load_env32.c +++ b/core/elflink/load_env32.c @@ -124,14 +124,13 @@ void load_env32(com32sys_t * regs __unused) dprintf("Starting 32 bit elf module subsystem...\n"); - PATH = malloc(strlen(PATH_DEFAULT) + 1); + PATH = malloc(strlen(CurrentDirName) + 1); if (!PATH) { printf("Couldn't allocate memory for PATH\n"); return; } - strcpy(PATH, PATH_DEFAULT); - PATH[strlen(PATH_DEFAULT)] = '\0'; + strcpy(PATH, CurrentDirName); init_module_subsystem(&core_module); diff --git a/core/include/fs.h b/core/include/fs.h index fa5bbc2c..9d552787 100644 --- a/core/include/fs.h +++ b/core/include/fs.h @@ -182,7 +182,6 @@ static inline struct file *handle_to_file(uint16_t handle) return handle ? &files[handle-1] : NULL; } -#define PATH_DEFAULT "/boot/syslinux/:/boot/" extern char *PATH; /* fs.c */ |