[part_man] Removing unnecessary prints.
authortzachid <tzachid@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Mon, 1 Sep 2008 14:06:08 +0000 (14:06 +0000)
committertzachid <tzachid@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Mon, 1 Sep 2008 14:06:08 +0000 (14:06 +0000)
signed off by:Slava Strebkov [slavas@voltaire.com]

git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@1540 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

tools/part_man/user/part_man.c

index 8ce183e..db3a5d1 100644 (file)
@@ -54,7 +54,6 @@ static int reg_ibbus_pkey_show(IN BOOLEAN show,OUT char *partKey, OUT HKEY *reg_
        ret = RegOpenKeyEx(HKEY_LOCAL_MACHINE,IBBUS_SERV_KEY,0,KEY_SET_VALUE | KEY_QUERY_VALUE ,reg_handle);\r
        if (ERROR_SUCCESS != ret)\r
        {\r
-               printf("reg_ibbus_pkey_show error = %d\n",GetLastError());\r
                return 0;\r
        }       \r
 \r
@@ -63,14 +62,12 @@ static int reg_ibbus_pkey_show(IN BOOLEAN show,OUT char *partKey, OUT HKEY *reg_
                ret = RegQueryValueEx(*reg_handle,"PartitionKey",NULL,NULL,(LPBYTE)partKey,&read_length);\r
                if (ERROR_MORE_DATA == ret)\r
                {\r
-                       printf("reg_ibbus_pkey_show : more buffer space required\n");\r
                        retval = 0;\r
                        break;\r
                }\r
 \r
                if (ERROR_SUCCESS != ret)\r
                {\r
-                       printf("RegQueryValueEx : Error %d\n",ret);\r
                        retval = 0;\r
                        break;\r
                }\r
@@ -295,7 +292,7 @@ static int reg_ibbus_pkey_rem(const unsigned __int16 *pkeys, unsigned short pkey
                if(! pkey->pkey_num)\r
                {\r
                        /* nothing to delete */\r
-                       printf("No pkey found to remove\n");\r
+                       printf("Nothing to remove\n");\r
                        retval = 1;\r
                        break;\r
                }\r
@@ -307,7 +304,7 @@ static int reg_ibbus_pkey_rem(const unsigned __int16 *pkeys, unsigned short pkey
                ret = RegSetValueEx(reg_handle,"PartitionKey",0,REG_SZ,(BYTE*)newKey, (DWORD)strlen(newKey));\r
                if (ERROR_SUCCESS != ret)\r
                {\r
-                       printf("reg_ibbus_pkey_add RegSetValueEx error = %d\n",GetLastError());\r
+                       printf("registry operation failed error = %d\n",GetLastError());\r
                        retval = 1;\r
                        break;\r
                }\r
@@ -378,7 +375,7 @@ boolean_t reg_pkey_operation(const REQUEST_IN *input)
        LONG   ret;\r
        if(!input)\r
        {\r
-               printf("create_ipoib_pdo : invalid input parameter\n");\r
+               printf("invalid input parameter\n");\r
                return FALSE;\r
        }\r
 \r
@@ -390,7 +387,10 @@ boolean_t reg_pkey_operation(const REQUEST_IN *input)
        else if(input->u.guid_pkey.action == pkey_rem)\r
                result = reg_ibbus_pkey_rem((unsigned __int16*)input->u.guid_pkey.pkeys, input->u.guid_pkey.pkey_num, &pkeys);\r
        else if(input->u.guid_pkey.action == pkey_show)\r
-               result =  reg_ibbus_print_pkey();\r
+       {       \r
+               reg_ibbus_print_pkey();\r
+               return TRUE;\r
+       }\r
        else\r
                printf("Invalid command to part_man.exe\n");\r
 \r
@@ -413,7 +413,7 @@ boolean_t reg_pkey_operation(const REQUEST_IN *input)
                                }\r
                                else\r
                                {\r
-                                       printf("reg_ibbus_pkey_add RegSetValueEx error = %d\n",GetLastError());\r
+                                       printf("registry operation failed = %d\n",GetLastError());\r
                                }\r
                        }\r
                }\r