]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
install/dracut-install.c: redirect stderr to stdout and skip loader
authorHarald Hoyer <harald@redhat.com>
Tue, 10 Jul 2012 08:53:28 +0000 (10:53 +0200)
committerHarald Hoyer <harald@redhat.com>
Tue, 10 Jul 2012 10:24:16 +0000 (12:24 +0200)
skip if ldd was run on the loader

install/dracut-install.c

index 1d5748d3303015293f624bc11e37b53a8eb12c19..ee6950ae2919695cfe59a5ab7d65379a4115a7db 100644 (file)
@@ -268,7 +268,7 @@ static int resolve_deps(const char *src)
         }
 
         /* run ldd */
-        asprintf(&cmd, "ldd %s", src);
+        asprintf(&cmd, "ldd %s 2>&1", src);
         fptr = popen(cmd, "r");
 
         while (!feof(fptr)) {
@@ -282,6 +282,9 @@ static int resolve_deps(const char *src)
                 if (strstr(buf, "not a dynamic executable"))
                         break;
 
+                if (strstr(buf, "loader cannot load itself"))
+                        break;
+
                 p = strstr(buf, "/");
                 if (p) {
                         int r;