Blame SOURCES/ltrace-0.7.91-cant_open.patch

f84355
diff -urp ltrace-0.7.91/libltrace.c master/libltrace.c
f84355
--- ltrace-0.7.91/libltrace.c	2014-01-14 16:31:37.696174464 +0100
f84355
+++ master/libltrace.c	2013-11-21 14:06:38.623701688 +0100
f84355
@@ -113,9 +117,13 @@ ltrace_init(int argc, char **argv) {
f84355
 	if (command) {
f84355
 		/* Check that the binary ABI is supported before
f84355
 		 * calling execute_program.  */
f84355
-		struct ltelf lte;
f84355
-		ltelf_init(&lte, command);
f84355
-		ltelf_destroy(<e;;
f84355
+		{
f84355
+			struct ltelf lte;
f84355
+			if (ltelf_init(&lte, command) == 0)
f84355
+				ltelf_destroy(<e;;
f84355
+			else
f84355
+				exit(EXIT_FAILURE);
f84355
+		}
f84355
 
f84355
 		pid_t pid = execute_program(command, argv);
f84355
 		struct process *proc = open_program(command, pid);
f84355
diff -urp ltrace-0.7.91/ltrace-elf.c master/ltrace-elf.c
f84355
--- ltrace-0.7.91/ltrace-elf.c	2014-01-14 16:31:37.688174420 +0100
f84355
+++ master/ltrace-elf.c	2013-11-22 18:17:11.767721609 +0100
f84355
@@ -361,8 +361,11 @@ ltelf_init(struct ltelf *lte, const char
f84355
 {
f84355
 	memset(lte, 0, sizeof *lte);
f84355
 	lte->fd = open(filename, O_RDONLY);
f84355
-	if (lte->fd == -1)
f84355
+	if (lte->fd == -1) {
f84355
+		fprintf(stderr, "Can't open %s: %s\n", filename,
f84355
+			strerror(errno));
f84355
 		return 1;
f84355
+	}
f84355
 
f84355
 	elf_version(EV_CURRENT);
f84355