VirtualBox

Changeset 3093 in vbox


Ignore:
Timestamp:
Jun 11, 2007 4:36:47 PM (18 years ago)
Author:
vboxsync
Message:

Hack around incomprehensible VDI error message for VMDK files that fail
to open for any reason (most popular is access problems).

File:
1 edited

Legend:

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

    r3043 r3093  
    10691069
    10701070    HardDiskStorageType_T order [2];
     1071    size_t cOrder = ELEMENTS (order);
    10711072
    10721073    if (RTPathCompare (ext, ".vmdk") == 0)
    10731074    {
     1075        /// @todo This is a hack. The proper solution would be to save the
     1076        /// error info from the first try and restore that if everything fails.
     1077        /// That way a non-working VMDK will get a proper VMDK diagnostics
     1078        /// message and not some incomprehensible VDI error.
    10741079        order [0] = HardDiskStorageType_VMDKImage;
    1075         order [1] = HardDiskStorageType_VirtualDiskImage;
     1080        cOrder = 1;
    10761081    }
    10771082    else
     
    10811086    }
    10821087
    1083     for (size_t i = 0; i < ELEMENTS (order); ++ i)
     1088    for (size_t i = 0; i < cOrder; ++ i)
    10841089    {
    10851090        switch (order [i])
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