mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-23 15:32:25 +00:00
sculpt: route non-usb block sessions to 'drivers'
This commit is contained in:
parent
1bfc828826
commit
9334ec09e2
@ -50,10 +50,7 @@ struct Sculpt::Storage_target
|
|||||||
|
|
||||||
void gen_block_session_route(Xml_generator &xml) const
|
void gen_block_session_route(Xml_generator &xml) const
|
||||||
{
|
{
|
||||||
bool const ahci = (Label(Cstring(device.string(), 4)) == "ahci");
|
bool const usb = (Label(Cstring(device.string(), 3)) == "usb");
|
||||||
bool const nvme = (Label(Cstring(device.string(), 4)) == "nvme");
|
|
||||||
bool const usb = (Label(Cstring(device.string(), 3)) == "usb");
|
|
||||||
|
|
||||||
bool const whole_device = !partition.valid();
|
bool const whole_device = !partition.valid();
|
||||||
|
|
||||||
xml.node("service", [&] () {
|
xml.node("service", [&] () {
|
||||||
@ -61,14 +58,13 @@ struct Sculpt::Storage_target
|
|||||||
|
|
||||||
if (whole_device) {
|
if (whole_device) {
|
||||||
|
|
||||||
if (ahci || nvme)
|
|
||||||
xml.node("parent", [&] () { xml.attribute("label", device); });
|
|
||||||
|
|
||||||
if (usb)
|
if (usb)
|
||||||
xml.node("child", [&] () {
|
xml.node("child", [&] () {
|
||||||
xml.attribute("name", Label(device, ".drv"));
|
xml.attribute("name", Label(device, ".drv"));
|
||||||
xml.attribute("label", partition);
|
xml.attribute("label", partition);
|
||||||
});
|
});
|
||||||
|
else
|
||||||
|
xml.node("parent", [&] () { xml.attribute("label", device); });
|
||||||
}
|
}
|
||||||
|
|
||||||
/* access partition */
|
/* access partition */
|
||||||
|
Loading…
Reference in New Issue
Block a user