ahci: report ports correctly
Only use one report for devices report, not one per device fixes #3671
This commit is contained in:
parent
1087e3f59e
commit
c856ba2a49
|
@ -184,11 +184,11 @@ class Ahci::Driver : Noncopyable
|
||||||
|
|
||||||
void report_ports(Reporter &reporter)
|
void report_ports(Reporter &reporter)
|
||||||
{
|
{
|
||||||
auto report = [&](Port const &port, unsigned index, bool atapi) {
|
Reporter::Xml_generator xml(reporter, [&] () {
|
||||||
|
|
||||||
Block::Session::Info info = port.info();
|
auto report = [&](Port const &port, unsigned index, bool atapi) {
|
||||||
Reporter::Xml_generator xml(reporter, [&] () {
|
|
||||||
|
|
||||||
|
Block::Session::Info info = port.info();
|
||||||
xml.node("port", [&] () {
|
xml.node("port", [&] () {
|
||||||
xml.attribute("num", index);
|
xml.attribute("num", index);
|
||||||
xml.attribute("type", atapi ? "ATAPI" : "ATA");
|
xml.attribute("type", atapi ? "ATAPI" : "ATA");
|
||||||
|
@ -199,10 +199,10 @@ class Ahci::Driver : Noncopyable
|
||||||
xml.attribute("serial", _ata[index]->serial->cstring());
|
xml.attribute("serial", _ata[index]->serial->cstring());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
};
|
||||||
};
|
|
||||||
|
|
||||||
for_each_port(report);
|
for_each_port(report);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue