Changeset 95140 in vbox for trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestProp.cpp
- Timestamp:
- May 31, 2022 9:11:39 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestProp.cpp
r94234 r95140 52 52 static RTEXITCODE handleGetGuestProperty(HandlerArg *a) 53 53 { 54 HRESULT rc = S_OK;54 HRESULT hrc = S_OK; 55 55 56 56 setCurrentSubcommand(HELP_SCOPE_GUESTPROPERTY_GET); … … 91 91 } 92 92 } 93 return SUCCEEDED( rc) ? RTEXITCODE_SUCCESS : RTEXITCODE_FAILURE;93 return SUCCEEDED(hrc) ? RTEXITCODE_SUCCESS : RTEXITCODE_FAILURE; 94 94 } 95 95 96 96 static RTEXITCODE handleSetGuestProperty(HandlerArg *a) 97 97 { 98 HRESULT rc = S_OK;98 HRESULT hrc = S_OK; 99 99 100 100 setCurrentSubcommand(HELP_SCOPE_GUESTPROPERTY_SET); … … 146 146 Bstr(pszFlags).raw())); 147 147 148 if (SUCCEEDED( rc))148 if (SUCCEEDED(hrc)) 149 149 CHECK_ERROR(machine, SaveSettings()); 150 150 151 151 a->session->UnlockMachine(); 152 152 } 153 return SUCCEEDED( rc) ? RTEXITCODE_SUCCESS : RTEXITCODE_FAILURE;153 return SUCCEEDED(hrc) ? RTEXITCODE_SUCCESS : RTEXITCODE_FAILURE; 154 154 } 155 155 156 156 static RTEXITCODE handleDeleteGuestProperty(HandlerArg *a) 157 157 { 158 HRESULT rc = S_OK;158 HRESULT hrc = S_OK; 159 159 160 160 setCurrentSubcommand(HELP_SCOPE_GUESTPROPERTY_UNSET); … … 186 186 CHECK_ERROR(machine, DeleteGuestProperty(Bstr(pszName).raw())); 187 187 188 if (SUCCEEDED( rc))188 if (SUCCEEDED(hrc)) 189 189 CHECK_ERROR(machine, SaveSettings()); 190 190 191 191 a->session->UnlockMachine(); 192 192 } 193 return SUCCEEDED( rc) ? RTEXITCODE_SUCCESS : RTEXITCODE_FAILURE;193 return SUCCEEDED(hrc) ? RTEXITCODE_SUCCESS : RTEXITCODE_FAILURE; 194 194 } 195 195 … … 226 226 */ 227 227 ComPtr<IMachine> machine; 228 HRESULT rc;228 HRESULT hrc; 229 229 CHECK_ERROR(a->virtualBox, FindMachine(Bstr(a->argv[0]).raw(), 230 230 machine.asOutParam())); … … 246 246 ComSafeArrayAsOutParam(timestamps), 247 247 ComSafeArrayAsOutParam(flags))); 248 if (SUCCEEDED( rc))248 if (SUCCEEDED(hrc)) 249 249 { 250 250 if (names.size() == 0) … … 255 255 } 256 256 } 257 return SUCCEEDED( rc) ? RTEXITCODE_SUCCESS : RTEXITCODE_FAILURE;257 return SUCCEEDED(hrc) ? RTEXITCODE_SUCCESS : RTEXITCODE_FAILURE; 258 258 } 259 259 … … 280 280 pszPatterns = a->argv[1]; 281 281 ComPtr<IMachine> machine; 282 HRESULT rc;282 HRESULT hrc; 283 283 CHECK_ERROR(a->virtualBox, FindMachine(Bstr(a->argv[0]).raw(), 284 284 machine.asOutParam())); … … 334 334 335 335 ComPtr<IEvent> ev; 336 rc = es->GetEvent(listener, cMsWait, ev.asOutParam());337 if (ev) 336 hrc = es->GetEvent(listener, cMsWait, ev.asOutParam()); 337 if (ev) /** @todo r=andy Why not using SUCCEEDED(hrc) here? */ 338 338 { 339 339 VBoxEventType_T aType; 340 rc = ev->COMGETTER(Type)(&aType);340 hrc = ev->COMGETTER(Type)(&aType); 341 341 switch (aType) 342 342 {
Note:
See TracChangeset
for help on using the changeset viewer.