[Openib-windows] RE: Wsd service installer

Yossi Leybovich sleybo at mellanox.co.il
Thu Aug 11 03:25:21 PDT 2005


here is the patch :

you can add stringfy macros to complib if you like.
If its OK I will create patch forics_ver.h


Index: tools/wsdinstall/user/InstallSP.sln
===================================================================
--- tools/wsdinstall/user/InstallSP.sln	(revision 260)
+++ tools/wsdinstall/user/InstallSP.sln	(working copy)
@@ -1,21 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 8.00
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "InstallSP",
"InstallSP.vcproj", "{B3A2B7A0-1906-413E-A457-8AD2FC5E88BB}"
-	ProjectSection(ProjectDependencies) = postProject
-	EndProjectSection
-EndProject
-Global
-	GlobalSection(SolutionConfiguration) = preSolution
-		Debug = Debug
-		Release = Release
-	EndGlobalSection
-	GlobalSection(ProjectConfiguration) = postSolution
-		{B3A2B7A0-1906-413E-A457-8AD2FC5E88BB}.Debug.ActiveCfg =
Debug|Win32
-		{B3A2B7A0-1906-413E-A457-8AD2FC5E88BB}.Debug.Build.0 =
Debug|Win32
-		{B3A2B7A0-1906-413E-A457-8AD2FC5E88BB}.Release.ActiveCfg =
Release|Win32
-		{B3A2B7A0-1906-413E-A457-8AD2FC5E88BB}.Release.Build.0 =
Release|Win32
-	EndGlobalSection
-	GlobalSection(ExtensibilityGlobals) = postSolution
-	EndGlobalSection
-	GlobalSection(ExtensibilityAddIns) = postSolution
-	EndGlobalSection
-EndGlobal
Index: tools/wsdinstall/user/installsp.c
===================================================================
--- tools/wsdinstall/user/installsp.c	(revision 260)
+++ tools/wsdinstall/user/installsp.c	(working copy)
@@ -44,11 +44,16 @@
 #include <stdio.h>
 
 /* Initialize the LSP's provider path for Infiband Service Provider dll */
+
+#define _stringfy(a)	#a
+#define stringfy(a)	_stringfy(a)
+
 static const WCHAR *provider_path = L"%SYSTEMROOT%\\system32\\ibwsd.dll";
-static const WCHAR *provider_name = L"SilverStorm Winsock Direct for
InfiniBand";
 static const char *winsock_key_path =
"System\\CurrentControlSet\\Services\\Winsock\\Parameters\\TCP on SAN";
-static const char *silverstorm_key_name = "SilverStorm InfiniBand";
+static const CHAR *provider_name = stringfy(IB_COMPANY_NAME) " Winsock
Direct for InfiniBand";
+static const char *winsock_key_name = stringfy(IB_COMPANY_NAME) "
InfiniBand";
 
+
 /* Unique provider GUID generated with "uuidgen -s" */
 static GUID provider_guid = {
 	/* c943654d-2c84-4db7-af3e-fdf1c5322458 */
@@ -147,7 +152,7 @@
 		REG_OPTION_NON_VOLATILE, (KEY_WRITE | KEY_READ), NULL,
&hkey, NULL );
 	if( reg_error == ERROR_SUCCESS )
 	{
-		reg_error = RegSetValueEx( hkey, silverstorm_key_name, 0,
REG_BINARY,
+		reg_error = RegSetValueEx( hkey, winsock_key_name, 0,
REG_BINARY,
 			(PBYTE)&provider_guid, sizeof(GUID) );
 		if( reg_error == ERROR_SUCCESS )
 		{
@@ -190,7 +195,7 @@
 	provider.iSecurityScheme = SECURITY_PROTOCOL_NONE;
 	provider.dwMessageSize = 0xFFFFFFFF; /* IB supports 32-bit lengths
for data transfers on RC */
 	provider.dwProviderReserved = 0;
-	wcscpy( provider.szProtocol, provider_name );
+	wcscpy( provider.szProtocol, ( const WCHAR*)provider_name );
 
 	rc = WSCInstallProvider(
 		&provider_guid, provider_path, &provider, 1, &errno );
@@ -222,7 +227,7 @@
 							 &hkey);
 	if (reg_error == ERROR_SUCCESS) {
 
-		reg_error = RegDeleteValue(hkey, silverstorm_key_name);
+		reg_error = RegDeleteValue(hkey, winsock_key_name);
 		if (reg_error == ERROR_SUCCESS) {
 			/* Force the system to remove the key now. */
 			RegFlushKey(hkey);
Index: tools/wsdinstall/user/makefile
===================================================================
--- tools/wsdinstall/user/makefile	(revision 260)
+++ tools/wsdinstall/user/makefile	(working copy)
@@ -4,4 +4,5 @@
 # that is shared by all the driver components of the Windows NT DDK
 #
 
+!INCLUDE ..\..\..\inc\makefile.inc
 !INCLUDE $(NTMAKEENV)\makefile.def
Index: inc/makefile.inc
===================================================================
--- inc/makefile.inc	(revision 0)
+++ inc/makefile.inc	(revision 0)
@@ -0,0 +1,7 @@
+!if "$(IB_COMPANY_NAME)" == ""
+C_DEFINES =$(C_DEFINES) /DIB_COMPANY_NAME="OpenIB"
+!  message  Current company name OpenIB 
+!else
+C_DEFINES =$(C_DEFINES) /DIB_COMPANY_NAME="$(IB_COMPANY_NAME)"
+!  message  Current company name $(IB_COMPANY_NAME)
+!endif

Thanks
Yossi 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20050811/ea4717c7/attachment.html>


More information about the ofw mailing list