Blame SOURCES/0008-expose-hints-in-XML-output-688.patch

21ef37
From 235e46c6adfcb0cb5feaec8073cacd0db0bc98e7 Mon Sep 17 00:00:00 2001
21ef37
From: Amit Saha <asaha@redhat.com>
21ef37
Date: Tue, 2 Jun 2015 14:11:32 +1000
21ef37
Subject: [PATCH 08/26] expose hints in XML output (#688)
21ef37
21ef37
---
21ef37
 src/core/hw.cc | 13 +++++++++++++
21ef37
 1 file changed, 13 insertions(+)
21ef37
21ef37
diff --git a/src/core/hw.cc b/src/core/hw.cc
21ef37
index 44e2bd8..963f4ba 100644
21ef37
--- a/src/core/hw.cc
21ef37
+++ b/src/core/hw.cc
21ef37
@@ -1987,6 +1987,19 @@ string hwNode::asXML(unsigned level)
21ef37
       out << "</resources>" << endl;
21ef37
     }
21ef37
     resources.clear();
21ef37
+
21ef37
+    vector < string > hints = getHints();
21ef37
+    if (hints.size() > 0) {
21ef37
+      out << spaces(2*level+1);
21ef37
+      out << "<hints>" << endl;
21ef37
+      for(unsigned int i=0; i
21ef37
+        out << spaces(2*level+2);
21ef37
+        out << "<hint name=\"" << hints[i] << "\" " << "value=\"" << getHint(hints[i]).asString() << "\" />";
21ef37
+        out << endl;
21ef37
+      }
21ef37
+      out << spaces(2*level+1);
21ef37
+      out << "</hints>" << endl;
21ef37
+    }
21ef37
   }
21ef37
 
21ef37
   for (unsigned int i = 0; i < countChildren(); i++)
21ef37
-- 
21ef37
2.10.2
21ef37