[ofw][patch] removing unnessesary prints

Tzachi Dar tzachid at mellanox.co.il
Mon Sep 1 23:46:03 PDT 2008


Committed to trunk and branch (1540, 1541).  

Thanks
Tzachi

> -----Original Message-----
> From: ofw-bounces at lists.openfabrics.org 
> [mailto:ofw-bounces at lists.openfabrics.org] On Behalf Of Slava Strebkov
> Sent: Sunday, August 31, 2008 5:33 PM
> To: ofw at lists.openfabrics.org
> Subject: [ofw][patch] removing unnessesary prints
> 
>  <<part_man.diff>>
> Removing unnessesary prints
> 
> Index: tools/part_man/user/part_man.c
> ===================================================================
> --- tools/part_man/user/part_man.c	(revision 1537)
> +++ tools/part_man/user/part_man.c	(working copy)
> @@ -54,7 +54,6 @@
>  	ret =
> RegOpenKeyEx(HKEY_LOCAL_MACHINE,IBBUS_SERV_KEY,0,KEY_SET_VALUE
>  | KEY_QUERY_VALUE ,reg_handle);
>  	if (ERROR_SUCCESS != ret)
>  	{
> -		printf("reg_ibbus_pkey_show error =
> %d\n",GetLastError());
>  		return 0;
>  	}	
>  
> @@ -63,14 +62,12 @@
>  		ret =
> RegQueryValueEx(*reg_handle,"PartitionKey",NULL,NULL,(LPBYTE)p
> artKey,&re
> ad_length);
>  		if (ERROR_MORE_DATA == ret)
>  		{
> -			printf("reg_ibbus_pkey_show : more buffer space
> required\n");
>  			retval = 0;
>  			break;
>  		}
>  
>  		if (ERROR_SUCCESS != ret)
>  		{
> -			printf("RegQueryValueEx : Error %d\n",ret);
>  			retval = 0;
>  			break;
>  		}
> @@ -295,7 +292,7 @@
>  		if(! pkey->pkey_num)
>  		{
>  			/* nothing to delete */
> -			printf("No pkey found to remove\n");
> +			printf("Nothing to remove\n");
>  			retval = 1;
>  			break;
>  		}
> @@ -307,7 +304,7 @@
>  		ret =
> RegSetValueEx(reg_handle,"PartitionKey",0,REG_SZ,(BYTE*)newKey,
> (DWORD)strlen(newKey));
>  		if (ERROR_SUCCESS != ret)
>  		{
> -			printf("reg_ibbus_pkey_add RegSetValueEx error =
> %d\n",GetLastError());
> +			printf("registry operation failed error =
> %d\n",GetLastError());
>  			retval = 1;
>  			break;
>  		}
> @@ -378,7 +375,7 @@
>  	LONG   ret;
>  	if(!input)
>  	{
> -		printf("create_ipoib_pdo : invalid input parameter\n");
> +		printf("invalid input parameter\n");
>  		return FALSE;
>  	}
>  
> @@ -390,7 +387,10 @@
>  	else if(input->u.guid_pkey.action == pkey_rem)
>  		result = reg_ibbus_pkey_rem((unsigned 
> __int16*)input->u.guid_pkey.pkeys, 
> input->u.guid_pkey.pkey_num, &pkeys);
>  	else if(input->u.guid_pkey.action == pkey_show)
> -		result =  reg_ibbus_print_pkey();
> +	{	
> +		reg_ibbus_print_pkey();
> +		return TRUE;
> +	}
>  	else
>  		printf("Invalid command to part_man.exe\n");
>  
> @@ -413,7 +413,7 @@
>  				}
>  				else
>  				{
> -					printf("reg_ibbus_pkey_add
> RegSetValueEx error = %d\n",GetLastError());
> +					printf("registry operation
> failed = %d\n",GetLastError());
>  				}
>  			}
>  		}
> 
> 
> Slava
> 



More information about the ofw mailing list