MCPcopy Create free account
hub / github.com/M2Team/NanaBox / ValidateScsiDeviceConfiguration

Method ValidateScsiDeviceConfiguration

NanaBox/ConfigurationManager.cpp:35–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33}
34
35void NanaBox::ValidateScsiDeviceConfiguration(
36 winrt::hstring const& HcsVmId,
37 NanaBox::ScsiDeviceConfiguration const& Configuration)
38{
39 std::wstring Path = Mile::ToWideString(CP_UTF8, Configuration.Path);
40 if (NanaBox::ScsiDeviceType::PhysicalDevice != Configuration.Type)
41 {
42 Path = ::GetAbsolutePath(Path);
43 if (!::PathFileExistsW(Path.c_str()))
44 {
45 return;
46 }
47 }
48 winrt::check_hresult(::HcsGrantVmAccess(HcsVmId.c_str(), Path.c_str()));
49}
50
51nlohmann::json NanaBox::MakeHcsComPortConfiguration(
52 std::string const& NamedPipe)

Callers

nothing calls this directly

Calls 1

GetAbsolutePathFunction · 0.85

Tested by

no test coverage detected