Changeset 29325 in vbox
- Timestamp:
- May 11, 2010 10:07:04 AM (15 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/MachineImpl.cpp
r29309 r29325 3072 3072 /* Apply the normal locking logic to the entire chain. */ 3073 3073 MediumLockList *pMediumLockList(new MediumLockList()); 3074 rc = diff->createMediumLockList(true , /* fFailIfInaccessible */3075 true /* fMedium Writable -- really? @todo r=dj*/,3074 rc = diff->createMediumLockList(true /* fFailIfInaccessible */, 3075 true /* fMediumLockWrite */, 3076 3076 medium, 3077 3077 *pMediumLockList); … … 8203 8203 8204 8204 MediumLockList *pMediumLockList(new MediumLockList()); 8205 rc = pMedium->createMediumLockList(true , /* fFailIfInaccessible */8206 false ,8205 rc = pMedium->createMediumLockList(true /* fFailIfInaccessible */, 8206 false /* fMediumLockWrite */, 8207 8207 NULL, 8208 8208 *pMediumLockList); … … 10819 10819 if (pMedium != NULL) 10820 10820 { 10821 bool fIsReadOnlyImage = ( devType == DeviceType_DVD10822 || devType == DeviceType_Floppy);10823 mrc = pMedium->createMediumLockList( !fIsReadOnlyImage /* fFailIfInaccessible */,10824 fIsReadOnlyImage, /* fReadOnly */10821 bool fIsReadOnlyImage = (devType == DeviceType_DVD); 10822 bool fIsVitalImage = (devType == DeviceType_HardDisk); 10823 mrc = pMedium->createMediumLockList(fIsVitalImage /* fFailIfInaccessible */, 10824 !fIsReadOnlyImage /* fMediumLockWrite */, 10825 10825 NULL, 10826 10826 *pMediumLockList); -
trunk/src/VBox/Main/MediumImpl.cpp
r29311 r29325 2202 2202 MediumLockList *pMediumLockList(new MediumLockList()); 2203 2203 HRESULT rc = diff->createMediumLockList(true /* fFailIfInaccessible */, 2204 true /* fMedium Writable */,2204 true /* fMediumLockWrite */, 2205 2205 this, 2206 2206 *pMediumLockList); … … 2293 2293 MediumLockList *pSourceMediumLockList(new MediumLockList()); 2294 2294 rc = createMediumLockList(true /* fFailIfInaccessible */, 2295 false /* fMedium Writable */,2295 false /* fMediumLockWrite */, 2296 2296 NULL, 2297 2297 *pSourceMediumLockList); … … 2305 2305 MediumLockList *pTargetMediumLockList(new MediumLockList()); 2306 2306 rc = pTarget->createMediumLockList(true /* fFailIfInaccessible */, 2307 true /* fMedium Writable */,2307 true /* fMediumLockWrite */, 2308 2308 pParent, 2309 2309 *pTargetMediumLockList); … … 2395 2395 MediumLockList *pMediumLockList(new MediumLockList()); 2396 2396 rc = createMediumLockList(true /* fFailIfInaccessible */ , 2397 true /* fMedium Writable */,2397 true /* fMediumLockWrite */, 2398 2398 NULL, 2399 2399 *pMediumLockList); … … 2490 2490 MediumLockList *pMediumLockList(new MediumLockList()); 2491 2491 rc = createMediumLockList(true /* fFailIfInaccessible */, 2492 true /* fMedium Writable */,2492 true /* fMediumLockWrite */, 2493 2493 NULL, 2494 2494 *pMediumLockList); … … 3111 3111 * @note Locks the medium tree for reading. 3112 3112 * 3113 * @param fMediumWritable Whether to associate a write lock with this medium. 3113 * @param fFailIfInaccessible Whether to refuse inaccessible media. 3114 * @param fMediumLockWrite Whether to associate a write lock with this medium. 3114 3115 * @param pToBeParent Medium which will become the parent of this medium. 3115 3116 * @param mediumLockList Where to store the resulting list. 3116 3117 */ 3117 3118 HRESULT Medium::createMediumLockList(bool fFailIfInaccessible, 3118 bool fMedium Writable,3119 bool fMediumLockWrite, 3119 3120 Medium *pToBeParent, 3120 3121 MediumLockList &mediumLockList) … … 3176 3177 3177 3178 if (pMedium == this) 3178 mediumLockList.Prepend(pMedium, fMedium Writable);3179 mediumLockList.Prepend(pMedium, fMediumLockWrite); 3179 3180 else 3180 3181 mediumLockList.Prepend(pMedium, false); … … 3911 3912 MediumLockList *pMediumLockList(new MediumLockList()); 3912 3913 rc = createMediumLockList(true /* fFailIfInaccessible */, 3913 true /* fMedium Writable */,3914 true /* fMediumLockWrite */, 3914 3915 NULL, 3915 3916 *pMediumLockList); … … 4299 4300 if (fMergeForward) 4300 4301 rc = pTarget->createMediumLockList(true /* fFailIfInaccessible */, 4301 true /* fMedium Writable */,4302 true /* fMediumLockWrite */, 4302 4303 NULL, 4303 4304 *aMediumLockList); 4304 4305 else 4305 4306 rc = createMediumLockList(true /* fFailIfInaccessible */, 4306 false /* fMedium Writable */,4307 false /* fMediumLockWrite */, 4307 4308 NULL, 4308 4309 *aMediumLockList); … … 5008 5009 MediumLockList mediumLockList; 5009 5010 HRESULT rc = createMediumLockList(true /* fFailIfInaccessible */, 5010 false /* fMedium Writable */,5011 false /* fMediumLockWrite */, 5011 5012 this, 5012 5013 mediumLockList); -
trunk/src/VBox/Main/include/MediumImpl.h
r29224 r29325 189 189 190 190 HRESULT createMediumLockList(bool fFailIfInaccessible, 191 bool fMedium Writable,191 bool fMediumLockWrite, 192 192 Medium *pToBeParent, 193 193 MediumLockList &mediumLockList);
Note:
See TracChangeset
for help on using the changeset viewer.