Add option to skip p2a bridge disable
Add a new constructor for P2aDataHandler with skipBridgeDisable bool to
enable an option to skip disableBridge() in AspeedPciBridge and
NuvotonPciBridge.
Signed-off-by: Willy Tu <wltu@google.com>
Change-Id: I439bbaa2b7295adc54a8aa98157db60a7e820837
diff --git a/tools/p2a.hpp b/tools/p2a.hpp
index 08153d2..259ca23 100644
--- a/tools/p2a.hpp
+++ b/tools/p2a.hpp
@@ -16,11 +16,18 @@
class P2aDataHandler : public DataInterface
{
public:
+ explicit P2aDataHandler(ipmiblob::BlobInterface* blob, const PciAccess* pci,
+ ProgressInterface* progress, bool skipBridgeDisable,
+ const internal::Sys* sys = &internal::sys_impl) :
+ blob(blob),
+ pci(pci), progress(progress), skipBridgeDisable(skipBridgeDisable),
+ sys(sys)
+ {}
+
P2aDataHandler(ipmiblob::BlobInterface* blob, const PciAccess* pci,
ProgressInterface* progress,
const internal::Sys* sys = &internal::sys_impl) :
- blob(blob),
- pci(pci), progress(progress), sys(sys)
+ P2aDataHandler(blob, pci, progress, false, sys)
{}
bool sendContents(const std::string& input, std::uint16_t session) override;
@@ -33,6 +40,7 @@
ipmiblob::BlobInterface* blob;
const PciAccess* pci;
ProgressInterface* progress;
+ bool skipBridgeDisable;
const internal::Sys* sys;
};