From 9334ec09e2da95b37313fe90c0b6a9781d47d9e1 Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Thu, 22 Jul 2021 11:36:42 +0200 Subject: [PATCH] sculpt: route non-usb block sessions to 'drivers' --- .../gems/src/app/sculpt_manager/model/storage_target.h | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/repos/gems/src/app/sculpt_manager/model/storage_target.h b/repos/gems/src/app/sculpt_manager/model/storage_target.h index 2a56b8b059..77df58090f 100644 --- a/repos/gems/src/app/sculpt_manager/model/storage_target.h +++ b/repos/gems/src/app/sculpt_manager/model/storage_target.h @@ -50,10 +50,7 @@ struct Sculpt::Storage_target void gen_block_session_route(Xml_generator &xml) const { - bool const ahci = (Label(Cstring(device.string(), 4)) == "ahci"); - bool const nvme = (Label(Cstring(device.string(), 4)) == "nvme"); - bool const usb = (Label(Cstring(device.string(), 3)) == "usb"); - + bool const usb = (Label(Cstring(device.string(), 3)) == "usb"); bool const whole_device = !partition.valid(); xml.node("service", [&] () { @@ -61,14 +58,13 @@ struct Sculpt::Storage_target if (whole_device) { - if (ahci || nvme) - xml.node("parent", [&] () { xml.attribute("label", device); }); - if (usb) xml.node("child", [&] () { xml.attribute("name", Label(device, ".drv")); xml.attribute("label", partition); }); + else + xml.node("parent", [&] () { xml.attribute("label", device); }); } /* access partition */