svn commit: r235059 - head/libexec/rtld-elf

Baptiste Daroussin bapt at FreeBSD.org
Sat May 5 16:37:15 UTC 2012


Author: bapt
Date: Sat May  5 16:37:14 2012
New Revision: 235059
URL: http://svn.freebsd.org/changeset/base/235059

Log:
  open the resolved path
  fix debug message
  
  Submitted by:	John Marino <draco at marino.st>
  Approved by:	des (mentor)

Modified:
  head/libexec/rtld-elf/libmap.c

Modified: head/libexec/rtld-elf/libmap.c
==============================================================================
--- head/libexec/rtld-elf/libmap.c	Sat May  5 15:35:22 2012	(r235058)
+++ head/libexec/rtld-elf/libmap.c	Sat May  5 16:37:14 2012	(r235059)
@@ -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;


More information about the svn-src-all mailing list