Changeset 28888 in vbox
- Timestamp:
- Apr 29, 2010 11:50:05 AM (15 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageDisk.cpp
r28800 r28888 109 109 else if (!RTStrICmp(psz, "writethrough")) 110 110 DiskType = MediumType_Writethrough; 111 else if (!RTStrICmp(psz, "shareable")) 112 DiskType = MediumType_Shareable; 111 113 else 112 114 rc = VERR_PARSE_ERROR; … … 1231 1233 typeStr = "writethrough"; 1232 1234 break; 1235 case MediumType_Shareable: 1236 typeStr = "shareable"; 1237 break; 1233 1238 } 1234 1239 RTPrintf("Type: %s\n", typeStr); -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageList.cpp
r28800 r28888 124 124 case MediumType_Writethrough: 125 125 typeStr = "writethrough"; 126 break; 127 case MediumType_Shareable: 128 typeStr = "shareable"; 126 129 break; 127 130 } -
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
r28854 r28888 3063 3063 mDiskTypes [KMediumType_Immutable] = tr ("Immutable", "DiskType"); 3064 3064 mDiskTypes [KMediumType_Writethrough] = tr ("Writethrough", "DiskType"); 3065 mDiskTypes [KMediumType_Shareable] = tr ("Shareable", "DiskType"); 3065 3066 mDiskTypes_Differencing = tr ("Differencing", "DiskType"); 3066 3067 -
trunk/src/VBox/Main/MediumImpl.cpp
r28874 r28888 1383 1383 } 1384 1384 1385 /** @todo implement this case later */ 1386 CheckComArgExpr(aType, aType != MediumType_Shareable); 1387 1385 1388 if (m->type == aType) 1386 1389 { … … 1395 1398 m->strLocationFull.raw()); 1396 1399 1397 /* cannot change the type of a hard disk being in use */1398 if (m->backRefs.size() != 0)1400 /* cannot change the type of a hard disk being in use by more than one VM */ 1401 if (m->backRefs.size() > 1) 1399 1402 return setError(E_FAIL, 1400 1403 tr("Cannot change the type of hard disk '%s' because it is attached to %d virtual machines"), … … 1412 1415 } 1413 1416 case MediumType_Writethrough: 1414 { 1415 /* cannot change to writethrough if there are children */ 1417 case MediumType_Shareable: 1418 { 1419 /* cannot change to writethrough or shareable if there are children */ 1416 1420 if (getChildren().size() != 0) 1417 1421 return setError(E_FAIL, … … 2934 2938 } 2935 2939 case MediumType_Immutable: 2936 {2937 2940 return true; 2938 }2939 2941 case MediumType_Writethrough: 2940 {2942 case MediumType_Shareable: 2941 2943 return false; 2942 }2943 2944 default: 2944 2945 break; -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r28835 r28888 9137 9137 <enum 9138 9138 name="MediumType" 9139 uuid=" 11f6f7a5-0327-409a-9d42-7db6a0cec578"9139 uuid="46bf1fd4-ad86-4ded-8c49-28bd2d148e5a" 9140 9140 > 9141 9141 <desc> … … 9160 9160 Write through medium (attached directly, ignored when 9161 9161 taking snapshots). 9162 </desc> 9163 </const> 9164 <const name="Shareable" value="3"> 9165 <desc> 9166 Allow using this medium concurrently by several machines. 9167 <note>This is a stub value. Not usable until this note is removed.</note> 9162 9168 </desc> 9163 9169 </const> -
trunk/src/VBox/Main/xml/Settings.cpp
r28867 r28888 921 921 else if (strType == "WRITETHROUGH") 922 922 med.hdType = MediumType_Writethrough; 923 else if (strType == "SHAREABLE") 924 { 925 /// @todo remove check once the medium type is implemented 926 throw ConfigFileError(this, &elmMedium, N_("HardDisk/@type attribute of Shareable is not implemented yet")); 927 med.hdType = MediumType_Shareable; 928 } 923 929 else 924 930 throw ConfigFileError(this, &elmMedium, N_("HardDisk/@type attribute must be one of Normal, Immutable or Writethrough")); … … 1178 1184 mdm.hdType == MediumType_Normal ? "Normal" : 1179 1185 mdm.hdType == MediumType_Immutable ? "Immutable" : 1180 /*mdm.hdType == MediumType_Writethrough ?*/ "Writethrough"; 1186 mdm.hdType == MediumType_Writethrough ? "Writethrough" : 1187 mdm.hdType == MediumType_Shareable ? "Shareable" : "INVALID"; 1181 1188 pelmHardDisk->setAttribute("type", pcszType); 1182 1189 }
Note:
See TracChangeset
for help on using the changeset viewer.