diff options
Diffstat (limited to 'src/VBox/Frontends/VBoxManage/VBoxManageStorageController.cpp')
-rw-r--r-- | src/VBox/Frontends/VBoxManage/VBoxManageStorageController.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/VBox/Frontends/VBoxManage/VBoxManageStorageController.cpp b/src/VBox/Frontends/VBoxManage/VBoxManageStorageController.cpp index d0e58643d..2f96a148d 100644 --- a/src/VBox/Frontends/VBoxManage/VBoxManageStorageController.cpp +++ b/src/VBox/Frontends/VBoxManage/VBoxManageStorageController.cpp @@ -1,4 +1,4 @@ -/* $Id: VBoxManageStorageController.cpp 28800 2010-04-27 08:22:32Z vboxsync $ */ +/* $Id: VBoxManageStorageController.cpp 29480 2010-05-14 15:24:19Z vboxsync $ */ /** @file * VBoxManage - The storage controller related commands. */ @@ -652,7 +652,7 @@ static const RTGETOPTDEF g_aStorageControllerOptions[] = { "--sataideemulation", 'e', RTGETOPT_REQ_UINT32 | RTGETOPT_FLAG_INDEX }, { "--sataportcount", 'p', RTGETOPT_REQ_UINT32 }, { "--remove", 'r', RTGETOPT_REQ_NOTHING }, - { "--iobackend", 'i', RTGETOPT_REQ_STRING }, + { "--hostiocache", 'i', RTGETOPT_REQ_STRING }, }; int handleStorageController(HandlerArg *a) @@ -662,7 +662,7 @@ int handleStorageController(HandlerArg *a) const char *pszCtl = NULL; const char *pszBusType = NULL; const char *pszCtlType = NULL; - const char *pszIoBackend = NULL; + const char *pszHostIOCache = NULL; ULONG satabootdev = ~0U; ULONG sataidedev = ~0U; ULONG sataportcount = ~0U; @@ -731,7 +731,7 @@ int handleStorageController(HandlerArg *a) case 'i': { - pszIoBackend = ValueUnion.psz; + pszHostIOCache = ValueUnion.psz; break; } @@ -920,26 +920,26 @@ int handleStorageController(HandlerArg *a) } } - if ( pszIoBackend + if ( pszHostIOCache && SUCCEEDED(rc)) { - ComPtr<IStorageController> ctl; + ComPtr<IStorageController> ctl; - CHECK_ERROR(machine, GetStorageControllerByName(Bstr(pszCtl), ctl.asOutParam())); + CHECK_ERROR(machine, GetStorageControllerByName(Bstr(pszCtl), ctl.asOutParam())); - if (!RTStrICmp(pszIoBackend, "buffered")) - { - CHECK_ERROR(ctl, COMSETTER(IoBackend)(IoBackendType_Buffered)); - } - else if (!RTStrICmp(pszIoBackend, "unbuffered")) - { - CHECK_ERROR(ctl, COMSETTER(IoBackend)(IoBackendType_Unbuffered)); - } - else - { - errorArgument("Invalid --type argument '%s'", pszIoBackend); - rc = E_FAIL; - } + if (!RTStrICmp(pszHostIOCache, "on")) + { + CHECK_ERROR(ctl, COMSETTER(UseHostIOCache)(TRUE)); + } + else if (!RTStrICmp(pszHostIOCache, "off")) + { + CHECK_ERROR(ctl, COMSETTER(UseHostIOCache)(FALSE)); + } + else + { + errorArgument("Invalid --hostiocache argument '%s'", pszHostIOCache); + rc = E_FAIL; + } } } |