aboutsummaryrefslogtreecommitdiffstats
path: root/extlinux/main.c
diff options
context:
space:
mode:
authorAlek Du <alek.du@intel.com>2010-02-08 10:40:09 +0800
committerH. Peter Anvin <hpa@zytor.com>2010-02-10 16:00:52 -0800
commit7c503d3286ce0b562ef075480029338556b306d7 (patch)
treef02f44b8d37fb53a954849860f1f2551e2bdf636 /extlinux/main.c
parente8d0e6fb18aae44474e864d8040d5ed44ff6acab (diff)
downloadsyslinux-7c503d3286ce0b562ef075480029338556b306d7.tar.gz
syslinux-7c503d3286ce0b562ef075480029338556b306d7.tar.xz
syslinux-7c503d3286ce0b562ef075480029338556b306d7.zip
pathbased: fix relative path in the extlinux installer
Fix a bug in the extlinux installer where the relative path is not found correctly. Signed-off-by: Alek Du <alek.du@intel.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'extlinux/main.c')
-rw-r--r--extlinux/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/extlinux/main.c b/extlinux/main.c
index 2cfb1ea6..c28f1907 100644
--- a/extlinux/main.c
+++ b/extlinux/main.c
@@ -386,7 +386,7 @@ int patch_file_and_bootblock(int fd, const char *dir, int devfd)
}
subpath = strchr(dirpath, '\0');
- while (--subpath > dirpath) {
+ while (--subpath >= dirpath) {
if (*subpath == '/') {
*subpath = '\0';
if (lstat(dirpath, &xdst) || dirst.st_dev != xdst.st_dev) {