summaryrefslogtreecommitdiffstats
path: root/patches/lshw-B.02.14/0002-Replace-keyword-node-with-hwnode-for-TinyXpath-compa.patch
blob: eb9abb67193dba1a504606bacfdef1ed92bec47e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
From 0eea91e31ed90c82acc45c221be689c10e4f779c Mon Sep 17 00:00:00 2001
From: Bart vdr. Meulen <bartvdrmeulen@gmail.com>
Date: Sun, 20 Jun 2010 22:48:09 +0200
Subject: [PATCH 2/2] Replace keyword node with hwnode for TinyXpath compatibility

It turns out that within TinyXpath 'node' is a reserved key-word.
Replace it with 'hwnode' when printing to xml.

Signed-off-by: Bart vdr. Meulen <bartvdrmeulen@gmail.com>
Signed-off-by: Remy Bohmer <linux@bohmer.net>
---
 src/core/hw.cc |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/core/hw.cc b/src/core/hw.cc
index 36679d3..367729b 100644
--- a/src/core/hw.cc
+++ b/src/core/hw.cc
@@ -1343,7 +1343,7 @@ string hwNode::asXML(unsigned level)
   if(visible(getClassName()))
   {
     out << spaces(2*level);
-    out << "<node id=\"" << getId() << "\"";
+    out << "<hwnode id=\"" << getId() << "\"";
     if (disabled())
       out << " disabled=\"true\"";
     if (claimed())
@@ -1596,7 +1596,7 @@ string hwNode::asXML(unsigned level)
   if(visible(getClassName()))
   {
     out << spaces(2*level);
-    out << "</node>" << endl;
+    out << "</hwnode>" << endl;
   }
 
   return out.str();
-- 
1.7.1