| 33 | } |
| 34 | |
| 35 | void 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 | |
| 51 | nlohmann::json NanaBox::MakeHcsComPortConfiguration( |
| 52 | std::string const& NamedPipe) |
nothing calls this directly
no test coverage detected