open the resolved path

fix debug message

Submitted by:	John Marino <draco@marino.st>
Approved by:	des (mentor)
This commit is contained in:
Baptiste Daroussin 2012-05-05 16:37:14 +00:00
parent acf4e8ef71
commit 5c98f30724
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=235059

View file

@ -121,16 +121,16 @@ lmc_parse_file(char *path)
}
}
fd = open(path, O_RDONLY);
fd = open(rpath, O_RDONLY);
if (fd == -1) {
dbg("lm_init: open(\"%s\") failed, %s", path,
dbg("lm_parse_file: open(\"%s\") failed, %s", rpath,
rtld_strerror(errno));
free(rpath);
return;
}
if (fstat(fd, &st) == -1) {
close(fd);
dbg("lm_init: fstat(\"%s\") failed, %s", path,
dbg("lm_parse_file: fstat(\"%s\") failed, %s", rpath,
rtld_strerror(errno));
free(rpath);
return;
@ -138,7 +138,7 @@ lmc_parse_file(char *path)
lm_map = mmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
if (lm_map == (const char *)MAP_FAILED) {
close(fd);
dbg("lm_init: mmap(\"%s\") failed, %s", path,
dbg("lm_parse_file: mmap(\"%s\") failed, %s", rpath,
rtld_strerror(errno));
free(rpath);
return;