[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [win-pv-devel] [PATCH] Remove code to clear stolen stack binding
This is now handled internally by XENVIF. Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx> --- src/coinst/coinst.c | 187 +--------------------------------------------------- 1 file changed, 2 insertions(+), 185 deletions(-) diff --git a/src/coinst/coinst.c b/src/coinst/coinst.c index cdf61c0..acbb5ff 100644 --- a/src/coinst/coinst.c +++ b/src/coinst/coinst.c @@ -309,189 +309,6 @@ fail1: return FALSE; } -static BOOLEAN -OpenSoftwareKey( - IN HDEVINFO DeviceInfoSet, - IN PSP_DEVINFO_DATA DeviceInfoData, - OUT PHKEY Key - ) -{ - HRESULT Error; - - *Key = SetupDiOpenDevRegKey(DeviceInfoSet, - DeviceInfoData, - DICS_FLAG_GLOBAL, - 0, - DIREG_DRV, - KEY_ALL_ACCESS); - if (*Key == INVALID_HANDLE_VALUE) { - SetLastError(ERROR_PATH_NOT_FOUND); - goto fail1; - } - - return TRUE; - -fail1: - Error = GetLastError(); - - { - PTCHAR Message; - - Message = __GetErrorMessage(Error); - Log("fail1 (%s)", Message); - LocalFree(Message); - } - - return FALSE; -} - -static BOOLEAN -GetAliasNetInstance( - IN HKEY Key, - OUT PTCHAR *AliasNetInstance - ) -{ - HRESULT Error; - DWORD MaxValueLength; - DWORD AliasNetInstanceLength; - DWORD Type; - - Log("====>"); - - Error = RegQueryInfoKey(Key, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - &MaxValueLength, - NULL, - NULL); - if (Error != ERROR_SUCCESS) { - SetLastError(Error); - goto fail1; - } - - AliasNetInstanceLength = MaxValueLength + sizeof (TCHAR); - - *AliasNetInstance = calloc(1, AliasNetInstanceLength); - if (*AliasNetInstance == NULL) - goto fail2; - - Error = RegQueryValueEx(Key, - "AliasNetInstance", - NULL, - &Type, - (LPBYTE)*AliasNetInstance, - &AliasNetInstanceLength); - if (Error != ERROR_SUCCESS) { - if (Error != ERROR_FILE_NOT_FOUND) { - SetLastError(Error); - goto fail3; - } - - Type = REG_SZ; - AliasNetInstanceLength = 0; - } - - if (Type != REG_SZ) { - SetLastError(ERROR_BAD_FORMAT); - goto fail4; - } - - if (AliasNetInstanceLength == 0) { - free(*AliasNetInstance); - *AliasNetInstance = NULL; - } - - Log("%s", (*AliasNetInstance == NULL) ? "[NONE]" : *AliasNetInstance); - - Log("<===="); - - return TRUE; - -fail4: - Log("fail4"); - -fail3: - Log("fail3"); - - free(*AliasNetInstance); - *AliasNetInstance = NULL; - -fail2: - Log("fail2"); - -fail1: - Error = GetLastError(); - - { - PTCHAR Message; - Message = __GetErrorMessage(Error); - Log("fail1 (%s)", Message); - LocalFree(Message); - } - - return FALSE; -} - -static VOID -ClearStolenLinkage( - IN HDEVINFO DeviceInfoSet, - IN PSP_DEVINFO_DATA DeviceInfoData - ) -{ - BOOLEAN Success; - PTCHAR AliasNetInstance; - HKEY Key; - HRESULT Error; - - Log("====>"); - - Success = OpenSoftwareKey(DeviceInfoSet, - DeviceInfoData, - &Key); - if (!Success) - goto fail1; - - Success = GetAliasNetInstance(Key, &AliasNetInstance); - if (!Success) - goto fail2; - - if (AliasNetInstance == NULL) - goto done; - - (VOID) RegDeleteKey(Key, "Linkage"); - (VOID) RegDeleteValue(Key, "NetLuidIndex"); - (VOID) RegDeleteValue(Key, "NetCfgInstanceID"); - -done: - RegCloseKey(Key); - - Log("<===="); - - return; - -fail2: - Log("fail2"); - - RegCloseKey(Key); - -fail1: - Error = GetLastError(); - - { - PTCHAR Message; - - Message = __GetErrorMessage(Error); - Log("fail1 (%s)", Message); - LocalFree(Message); - } -} - static FORCEINLINE HRESULT __DifInstallPreProcess( IN HDEVINFO DeviceInfoSet, @@ -592,12 +409,12 @@ __DifRemovePreProcess( IN PCOINSTALLER_CONTEXT_DATA Context ) { + UNREFERENCED_PARAMETER(DeviceInfoSet); + UNREFERENCED_PARAMETER(DeviceInfoData); UNREFERENCED_PARAMETER(Context); Log("<===>"); - ClearStolenLinkage(DeviceInfoSet, DeviceInfoData); - return NO_ERROR; } -- 2.1.1 _______________________________________________ win-pv-devel mailing list win-pv-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/cgi-bin/mailman/listinfo/win-pv-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |