equal
deleted
inserted
replaced
102 |
102 |
103 /** Lists the bus configuration. |
103 /** Lists the bus configuration. |
104 */ |
104 */ |
105 void CommandConfig::execute(const StringVector &args) |
105 void CommandConfig::execute(const StringVector &args) |
106 { |
106 { |
|
107 MasterIndexList masterIndices; |
|
108 bool doIndent; |
107 ConfigList configs; |
109 ConfigList configs; |
108 bool doIndent; |
|
109 |
110 |
110 if (args.size()) { |
111 if (args.size()) { |
111 stringstream err; |
112 stringstream err; |
112 err << "'" << getName() << "' takes no arguments!"; |
113 err << "'" << getName() << "' takes no arguments!"; |
113 throwInvalidUsageException(err); |
114 throwInvalidUsageException(err); |
114 } |
115 } |
115 |
116 |
116 doIndent = getMasterIndices().size() > 1; |
117 masterIndices = getMasterIndices(); |
|
118 doIndent = masterIndices.size() > 1; |
117 MasterIndexList::const_iterator mi; |
119 MasterIndexList::const_iterator mi; |
118 for (mi = getMasterIndices().begin(); |
120 for (mi = masterIndices.begin(); |
119 mi != getMasterIndices().end(); mi++) { |
121 mi != masterIndices.end(); mi++) { |
120 MasterDevice m(*mi); |
122 MasterDevice m(*mi); |
121 m.open(MasterDevice::Read); |
123 m.open(MasterDevice::Read); |
122 configs = selectedConfigs(m); |
124 configs = selectedConfigs(m); |
123 |
125 |
124 if (configs.size() && doIndent) { |
126 if (configs.size() && doIndent) { |