From d1fc3393cca72e8e432f827f7624e38734fad6dc Mon Sep 17 00:00:00 2001 From: davidovski Date: Thu, 9 Jun 2022 14:35:52 +0100 Subject: moved firmware to separate pacakges --- .../15565229509455527de9ce7cbb9530e2b31d043b.patch | 59 ++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 repo/lshw/15565229509455527de9ce7cbb9530e2b31d043b.patch (limited to 'repo/lshw/15565229509455527de9ce7cbb9530e2b31d043b.patch') diff --git a/repo/lshw/15565229509455527de9ce7cbb9530e2b31d043b.patch b/repo/lshw/15565229509455527de9ce7cbb9530e2b31d043b.patch new file mode 100644 index 0000000..0d9c65d --- /dev/null +++ b/repo/lshw/15565229509455527de9ce7cbb9530e2b31d043b.patch @@ -0,0 +1,59 @@ +From 15565229509455527de9ce7cbb9530e2b31d043b Mon Sep 17 00:00:00 2001 +From: Lyonel Vincent +Date: Wed, 27 May 2020 01:07:16 +0200 +Subject: [PATCH] clean-up JSON output + +--- + src/core/hw.cc | 29 +++++++++++++++++++++++++---- + 1 file changed, 25 insertions(+), 4 deletions(-) + +diff --git a/src/core/hw.cc b/src/core/hw.cc +index ab345fe..6aea7cf 100644 +--- a/src/core/hw.cc ++++ b/src/core/hw.cc +@@ -1650,13 +1650,20 @@ string hwNode::asJSON(unsigned level) + resources.clear(); + } + +- for (unsigned int i = 0; i < countChildren(); i++) ++ if(!::enabled("output:list") && countChildren()>0) + { +- out << getChild(i)->asJSON(visible(getClassName()) ? level + 2 : 1); +- if (visible(getChild(i)->getClassName())) ++ out << "," << endl; ++ out << spaces(2*level+2); ++ out << "\"children\" : ["; ++ for (unsigned int i = 0; i < countChildren(); i++) + { +- out << "," << endl; ++ out << getChild(i)->asJSON(visible(getClassName()) ? level + 2 : 1); ++ if (visible(getChild(i)->getClassName()) && i0) ++ { ++ bool needcomma = visible(getClassName()); ++ for (unsigned int i = 0; i < countChildren(); i++) ++ { ++ string json = getChild(i)->asJSON(visible(getClassName()) ? level + 2 : 1); ++ ++ if(needcomma && strip(json)!="") ++ out << "," << endl; ++ out << getChild(i)->asJSON(visible(getClassName()) ? level + 2 : 1); ++ needcomma |= strip(json)!=""; ++ } ++ } ++ + if (::enabled("output:list") && level == 0) + { + out << endl << "]" << endl; -- cgit v1.2.1