Changeset 10000 in vbox for trunk/src/VBox/Frontends/VBoxManage
- Timestamp:
- Jun 27, 2008 2:56:59 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 32453
- Location:
- trunk/src/VBox/Frontends/VBoxManage
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp
r9884 r10000 649 649 } 650 650 651 if (u64Cmd & USAGE_GET CONFIGVAL)652 { 653 RTPrintf("VBoxManage get configval<vmname>|<uuid> <key>\n"651 if (u64Cmd & USAGE_GETGUESTPROPERTY) 652 { 653 RTPrintf("VBoxManage getguestproperty <vmname>|<uuid> <key>\n" 654 654 "\n"); 655 655 } 656 656 657 if (u64Cmd & USAGE_SET CONFIGVAL)658 { 659 RTPrintf("VBoxManage set configval<vmname>|<uuid> <key>\n"657 if (u64Cmd & USAGE_SETGUESTPROPERTY) 658 { 659 RTPrintf("VBoxManage setguestproperty <vmname>|<uuid> <key>\n" 660 660 " [<value>] (no value deletes key)\n" 661 661 "\n"); … … 7470 7470 } 7471 7471 7472 static int handleGetConfigVal(int argc, char *argv[], 7473 ComPtr<IVirtualBox> virtualBox, ComPtr<ISession> session) 7472 static int handleGetGuestProperty(int argc, char *argv[], 7473 ComPtr<IVirtualBox> virtualBox, 7474 ComPtr<ISession> session) 7474 7475 { 7475 7476 HRESULT rc = S_OK; 7476 7477 7477 7478 if (argc != 2) 7478 return errorSyntax(USAGE_GET CONFIGVAL, "Incorrect number of parameters");7479 return errorSyntax(USAGE_GETGUESTPROPERTY, "Incorrect number of parameters"); 7479 7480 7480 7481 ComPtr<IMachine> machine; … … 7512 7513 { 7513 7514 Bstr value; 7514 CHECK_ERROR(machine, Get ConfigRegistryValue(Bstr(argv[1]), value.asOutParam()));7515 CHECK_ERROR(machine, GetGuestProperty(Bstr(argv[1]), value.asOutParam())); 7515 7516 if (value) 7516 7517 RTPrintf("Value: %lS\n", value.raw()); … … 7522 7523 } 7523 7524 7524 static int handleSetConfigVal(int argc, char *argv[], 7525 ComPtr<IVirtualBox> virtualBox, ComPtr<ISession> session) 7525 static int handleSetGuestProperty(int argc, char *argv[], 7526 ComPtr<IVirtualBox> virtualBox, 7527 ComPtr<ISession> session) 7526 7528 { 7527 7529 HRESULT rc = S_OK; 7528 7530 7529 7531 if (argc < 2) 7530 return errorSyntax(USAGE_SET CONFIGVAL, "Not enough parameters");7532 return errorSyntax(USAGE_SETGUESTPROPERTY, "Not enough parameters"); 7531 7533 7532 7534 ComPtr<IMachine> machine; … … 7541 7543 { 7542 7544 if (argc < 3) 7543 CHECK_ERROR(machine, Set ConfigRegistryValue(Bstr(argv[1]), NULL));7545 CHECK_ERROR(machine, SetGuestProperty(Bstr(argv[1]), NULL)); 7544 7546 else if (argc == 3) 7545 CHECK_ERROR(machine, Set ConfigRegistryValue(Bstr(argv[1]), Bstr(argv[2])));7547 CHECK_ERROR(machine, SetGuestProperty(Bstr(argv[1]), Bstr(argv[2]))); 7546 7548 else 7547 return errorSyntax(USAGE_SET CONFIGVAL, "Too many parameters");7549 return errorSyntax(USAGE_SETGUESTPROPERTY, "Too many parameters"); 7548 7550 } 7549 7551 return SUCCEEDED(rc) ? 0 : 1; … … 7884 7886 { "sharedfolder", handleSharedFolder }, 7885 7887 { "vmstatistics", handleVMStatistics }, 7886 { "get configval", handleGetConfigVal},7887 { "set configval", handleSetConfigVal},7888 { "getguestproperty", handleGetGuestProperty }, 7889 { "setguestproperty", handleSetGuestProperty }, 7888 7890 { NULL, NULL } 7889 7891 }; -
trunk/src/VBox/Frontends/VBoxManage/VBoxManage.h
r9884 r10000 70 70 #define USAGE_MODUNINSTALL RT_BIT_64(38) 71 71 #define USAGE_RENAMEVMDK RT_BIT_64(39) 72 #define USAGE_GET CONFIGVALRT_BIT_64(40)73 #define USAGE_SET CONFIGVALRT_BIT_64(41)72 #define USAGE_GETGUESTPROPERTY RT_BIT_64(40) 73 #define USAGE_SETGUESTPROPERTY RT_BIT_64(41) 74 74 #define USAGE_ALL (~(uint64_t)0) 75 75 /** @} */
Note:
See TracChangeset
for help on using the changeset viewer.