Blame 0069-install-dracut-install.c-redirect-stderr-to-stdout-a.patch
|
Harald Hoyer |
2265b4 |
From a92311074b487608bfd632ae3b443067d237b6f8 Mon Sep 17 00:00:00 2001
|
|
Harald Hoyer |
2265b4 |
From: Harald Hoyer <harald@redhat.com>
|
|
Harald Hoyer |
2265b4 |
Date: Tue, 10 Jul 2012 10:53:28 +0200
|
|
Harald Hoyer |
2265b4 |
Subject: [PATCH] install/dracut-install.c: redirect stderr to stdout and skip
|
|
Harald Hoyer |
2265b4 |
loader
|
|
Harald Hoyer |
2265b4 |
|
|
Harald Hoyer |
2265b4 |
skip if ldd was run on the loader
|
|
Harald Hoyer |
2265b4 |
---
|
|
Harald Hoyer |
2265b4 |
install/dracut-install.c | 5 ++++-
|
|
Harald Hoyer |
2265b4 |
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
Harald Hoyer |
2265b4 |
|
|
Harald Hoyer |
2265b4 |
diff --git a/install/dracut-install.c b/install/dracut-install.c
|
|
Harald Hoyer |
2265b4 |
index 1d5748d..ee6950a 100644
|
|
Harald Hoyer |
2265b4 |
--- a/install/dracut-install.c
|
|
Harald Hoyer |
2265b4 |
+++ b/install/dracut-install.c
|
|
Harald Hoyer |
2265b4 |
@@ -268,7 +268,7 @@ static int resolve_deps(const char *src)
|
|
Harald Hoyer |
2265b4 |
}
|
|
Harald Hoyer |
2265b4 |
|
|
Harald Hoyer |
2265b4 |
/* run ldd */
|
|
Harald Hoyer |
2265b4 |
- asprintf(&cmd, "ldd %s", src);
|
|
Harald Hoyer |
2265b4 |
+ asprintf(&cmd, "ldd %s 2>&1", src);
|
|
Harald Hoyer |
2265b4 |
fptr = popen(cmd, "r");
|
|
Harald Hoyer |
2265b4 |
|
|
Harald Hoyer |
2265b4 |
while (!feof(fptr)) {
|
|
Harald Hoyer |
2265b4 |
@@ -282,6 +282,9 @@ static int resolve_deps(const char *src)
|
|
Harald Hoyer |
2265b4 |
if (strstr(buf, "not a dynamic executable"))
|
|
Harald Hoyer |
2265b4 |
break;
|
|
Harald Hoyer |
2265b4 |
|
|
Harald Hoyer |
2265b4 |
+ if (strstr(buf, "loader cannot load itself"))
|
|
Harald Hoyer |
2265b4 |
+ break;
|
|
Harald Hoyer |
2265b4 |
+
|
|
Harald Hoyer |
2265b4 |
p = strstr(buf, "/");
|
|
Harald Hoyer |
2265b4 |
if (p) {
|
|
Harald Hoyer |
2265b4 |
int r;
|