VirtualBox

Changeset 18121 in vbox for trunk/src


Ignore:
Timestamp:
Mar 20, 2009 2:46:09 PM (16 years ago)
Author:
vboxsync
Message:

Main/HardDisk: enable cancelling for all operations which take really long (creating, merging, cloning, ...) - everything except deleting.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/HardDiskImpl.cpp

    r18115 r18121  
    13271327          ? BstrFmt (tr ("Creating fixed hard disk storage unit '%ls'"), m.locationFull.raw())
    13281328          : BstrFmt (tr ("Creating dynamic hard disk storage unit '%ls'"), m.locationFull.raw()),
    1329         FALSE /* aCancelable */);
     1329        TRUE /* aCancelable */);
    13301330    CheckComRCReturnRC (rc);
    13311331
     
    14571457            BstrFmt (tr ("Creating clone hard disk '%ls'"),
    14581458                     target->m.locationFull.raw()),
    1459             FALSE /* aCancelable */);
     1459            TRUE /* aCancelable */);
    14601460        CheckComRCThrowRC (rc);
    14611461
     
    15451545            BstrFmt (tr ("Creating flattened clone hard disk '%ls'"),
    15461546                     target->m.locationFull.raw()),
    1547             FALSE /* aCancelable */);
     1547            TRUE /* aCancelable */);
    15481548        CheckComRCThrowRC (rc);
    15491549
     
    24592459                BstrFmt (tr ("Creating differencing hard disk storage unit '%ls'"),
    24602460                         aTarget->m.locationFull.raw()),
    2461                 FALSE /* aCancelable */);
     2461                TRUE /* aCancelable */);
    24622462            CheckComRCReturnRC (rc);
    24632463        }
     
    27052705                BstrFmt (tr ("Merging hard disk '%s' to '%s'"),
    27062706                         name().raw(), aChain->target()->name().raw()),
    2707                 FALSE /* aCancelable */);
     2707                TRUE /* aCancelable */);
    27082708            CheckComRCReturnRC (rc);
    27092709        }
     
    34353435        /* update the progress object, capping it at 99% as the final percent
    34363436         * is used for additional operations like setting the UUIDs and similar. */
    3437         that->mm.vdProgress->notifyProgress (RT_MIN (uPercent, 99));
     3437        HRESULT rc = that->mm.vdProgress->notifyProgress (uPercent * 99 / 100);
     3438        if (FAILED(rc))
     3439        {
     3440            if (rc == E_FAIL)
     3441                return VERR_CANCELLED;
     3442            else
     3443                return VERR_INVALID_STATE;
     3444        }
    34383445    }
    34393446
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette