]> git.wh0rd.org - patches.git/blobdiff - pax-utils-grep-style.patch
more random patches. who knows.
[patches.git] / pax-utils-grep-style.patch
diff --git a/pax-utils-grep-style.patch b/pax-utils-grep-style.patch
new file mode 100644 (file)
index 0000000..3a2a088
--- /dev/null
@@ -0,0 +1,20 @@
+--- scanelf.c
++++ scanelf.c
+@@ -1223,7 +1223,7 @@ static int scanelf_from_file(char *filen
+       char *p;
+       char path[__PAX_UTILS_PATH_MAX];
+-      if (((strcmp(filename, "-")) == 0) && (ttyname(0) == NULL))
++      if (strcmp(filename, "-") == 0)
+               fp = stdin;
+       else if ((fp = fopen(filename, "r")) == NULL)
+               return 1;
+@@ -1653,6 +1653,8 @@ static void parseargs(int argc, char *ar
+               load_ld_so_conf(0, "/etc/ld.so.conf");
+       if (scan_ldpath) scanelf_ldpath();
+       if (scan_envpath) scanelf_envpath();
++      if (!from_file && ttyname(0) == NULL)
++              from_file = "-";
+       if (from_file) {
+               scanelf_from_file(from_file);
+               from_file = *argv;