mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-04-24 15:46:27 +00:00
[idd] driver: add additional logging to CIVSHMEM
Some checks failed
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / module (push) Has been cancelled
build / host-linux (push) Has been cancelled
build / host-windows-cross (push) Has been cancelled
build / host-windows-native (push) Has been cancelled
build / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
Some checks failed
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / module (push) Has been cancelled
build / host-linux (push) Has been cancelled
build / host-windows-cross (push) Has been cancelled
build / host-windows-native (push) Has been cancelled
build / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
This commit is contained in:
parent
a4406ac867
commit
656d01a694
@ -72,10 +72,12 @@ bool CIVSHMEM::Init()
|
||||
m_devices.push_back(data);
|
||||
}
|
||||
|
||||
if (GetLastError() != ERROR_NO_MORE_ITEMS)
|
||||
HRESULT hr = GetLastError();
|
||||
if (hr != ERROR_NO_MORE_ITEMS)
|
||||
{
|
||||
m_devices.clear();
|
||||
SetupDiDestroyDeviceInfoList(devInfoSet);
|
||||
DEBUG_ERROR_HR(hr, "Enumeration Failed");
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -111,12 +113,14 @@ bool CIVSHMEM::Init()
|
||||
|
||||
if (!device)
|
||||
{
|
||||
DEBUG_ERROR("Failed to match a shmDevice");
|
||||
SetupDiDestroyDeviceInfoList(devInfoSet);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (SetupDiEnumDeviceInterfaces(devInfoSet, &devInfoData, &GUID_DEVINTERFACE_IVSHMEM, 0, &devInterfaceData) == FALSE)
|
||||
{
|
||||
DEBUG_ERROR_HR(GetLastError(), "SetupDiEnumDeviceInterfaces");
|
||||
SetupDiDestroyDeviceInfoList(devInfoSet);
|
||||
return false;
|
||||
}
|
||||
@ -125,6 +129,7 @@ bool CIVSHMEM::Init()
|
||||
SetupDiGetDeviceInterfaceDetail(devInfoSet, &devInterfaceData, nullptr, 0, &reqSize, nullptr);
|
||||
if (!reqSize)
|
||||
{
|
||||
DEBUG_ERROR_HR(GetLastError(), "SetupDiGetDeviceInterfaceDetail");
|
||||
SetupDiDestroyDeviceInfoList(devInfoSet);
|
||||
return false;
|
||||
}
|
||||
@ -133,6 +138,7 @@ bool CIVSHMEM::Init()
|
||||
infData->cbSize = sizeof(PSP_DEVICE_INTERFACE_DETAIL_DATA);
|
||||
if (!SetupDiGetDeviceInterfaceDetail(devInfoSet, &devInterfaceData, infData, reqSize, nullptr, nullptr))
|
||||
{
|
||||
DEBUG_ERROR_HR(GetLastError(), "SetupDiGetDeviceInterfaceDetail");
|
||||
SetupDiDestroyDeviceInfoList(devInfoSet);
|
||||
return false;
|
||||
}
|
||||
@ -140,11 +146,13 @@ bool CIVSHMEM::Init()
|
||||
m_handle = CreateFile(infData->DevicePath, 0, 0, nullptr, OPEN_EXISTING, 0, 0);
|
||||
if (m_handle == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
DEBUG_ERROR_HR(GetLastError(), "CreateFile");
|
||||
SetupDiDestroyDeviceInfoList(devInfoSet);
|
||||
return false;
|
||||
}
|
||||
|
||||
SetupDiDestroyDeviceInfoList(devInfoSet);
|
||||
DEBUG_TRACE("IVSHMEM Initialized");
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -153,7 +161,7 @@ bool CIVSHMEM::Open()
|
||||
IVSHMEM_SIZE size;
|
||||
if (!DeviceIoControl(m_handle, IOCTL_IVSHMEM_REQUEST_SIZE, nullptr, 0, &size, sizeof(size), nullptr, nullptr))
|
||||
{
|
||||
DEBUG_ERROR("Failed to request ivshmem size");
|
||||
DEBUG_ERROR_HR(GetLastError(), "Failed to request ivshmem size");
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -163,7 +171,7 @@ bool CIVSHMEM::Open()
|
||||
config.cacheMode = IVSHMEM_CACHE_WRITECOMBINED;
|
||||
if (!DeviceIoControl(m_handle, IOCTL_IVSHMEM_REQUEST_MMAP, &config, sizeof(config), &map, sizeof(map), nullptr, nullptr))
|
||||
{
|
||||
DEBUG_ERROR("Failed to request ivshmem mmap");
|
||||
DEBUG_ERROR_HR(GetLastError(), "Failed to request ivshmem mmap");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user