From b6219cd671bb1b7e8f8a48a0547164d4dbaffc41 Mon Sep 17 00:00:00 2001
From: Martin Pitt <martin.pitt@ubuntu.com>
Date: Wed, 12 Nov 2014 10:13:06 +0100
Subject: [PATCH] umockdev-record: Ignore stderr from udevadm info

This avoids udev debug message spew on stderr if udev debugging is enabled.

https://bugs.debian.org/767909
---
 src/umockdev-record.vala | 6 +++---
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/umockdev-record.vala b/src/umockdev-record.vala
index ccb4337..421932e 100644
--- a/src/umockdev-record.vala
+++ b/src/umockdev-record.vala
@@ -222,7 +222,7 @@ record_device(string dev)
     debug("recording device %s", dev);
 
     // we start with udevadm dump of this device, which will include all udev properties
-    string u_out;
+    string u_out, u_err;
     int exitcode;
     try {
         Process.spawn_sync(null,
@@ -231,10 +231,10 @@ record_device(string dev)
                            SpawnFlags.SEARCH_PATH,
                            null,
                            out u_out,
-                           null,
+                           out u_err,
                            out exitcode);
         if (exitcode != 0)
-            throw new SpawnError.FAILED("udevadm exited with code %i".printf(exitcode));
+            throw new SpawnError.FAILED("udevadm exited with code %i\n%s".printf(exitcode, u_err));
     } catch (Error e) {
         exit_error("Cannot call udevadm: %s", e.message);
     }
-- 
2.1.3

