VirtualBox

Changeset 5115 in vbox


Ignore:
Timestamp:
Oct 1, 2007 8:32:57 AM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
24970
Message:

Main: CustomHardDisk wording.

Location:
trunk/src/VBox/Main
Files:
2 edited

Legend:

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

    r5101 r5115  
    10641064    storageTypes[] =
    10651065    {
     1066        /* try the plugin format first if there is no extension match */
     1067        { HardDiskStorageType_CustomHardDisk, NULL },
     1068        /* then try the rest */
    10661069        { HardDiskStorageType_VMDKImage, ".vmdk" },
    10671070        { HardDiskStorageType_VirtualDiskImage, ".vdi" },
     
    10761079    for (size_t i = 0; i < ELEMENTS (storageTypes); ++ i)
    10771080    {
    1078         if (RTPathCompare (ext, storageTypes [i].ext) == 0)
     1081        if (storageTypes [i].ext &&
     1082            RTPathCompare (ext, storageTypes [i].ext) == 0)
    10791083        {
    10801084            first = i;
     
    10881092    HRESULT firstRC = S_OK;
    10891093    com::ErrorInfoKeeper firstErr (true /* aIsNull */);
    1090 
    1091     if (haveFirst == false)
    1092     {
    1093         /* Try if a plugin supports this format. */
    1094         ComObjPtr <HCustomHardDisk> obj;
    1095         obj.createObject();
    1096         rc = obj->init (aVirtualBox, NULL, aLocation,
    1097                         FALSE /* aRegistered */);
    1098         if (SUCCEEDED (rc))
    1099         {
    1100             hardDisk = obj;
    1101             return rc;
    1102         }
    1103     }
    11041094
    11051095    for (size_t i = 0; i < ELEMENTS (storageTypes); ++ i)
     
    11341124                break;
    11351125            }
     1126            case HardDiskStorageType_CustomHardDisk:
     1127            {
     1128                ComObjPtr <HCustomHardDisk> obj;
     1129                obj.createObject();
     1130                rc = obj->init (aVirtualBox, NULL, aLocation,
     1131                                FALSE /* aRegistered */);
     1132                if (SUCCEEDED (rc))
     1133                {
     1134                    hardDisk = obj;
     1135                    return rc;
     1136                }
     1137                break;
     1138            }
    11361139            default:
    11371140            {
     
    15941597    CHECK_BUSY_AND_READERS();
    15951598
    1596     // append the default path if only a name is given
     1599    /* append the default path if only a name is given */
    15971600    Bstr path = aFilePath;
    15981601    if (aFilePath && *aFilePath)
     
    43474350 *                      image-less object.
    43484351 *  @param aRegistered  Whether to mark this disk as registered or not
    4349  *                      (ignored when @a aFilePath is @c NULL, assuming @c FALSE)
     4352 *                      (ignored when @a aLocation is @c NULL, assuming @c FALSE)
    43504353 */
    43514354HRESULT HCustomHardDisk::init (VirtualBox *aVirtualBox, HardDisk *aParent,
     
    45074510}
    45084511
    4509 // IVirtualDiskImage properties
     4512// ICustomHardDisk properties
    45104513////////////////////////////////////////////////////////////////////////////////
    45114514
     
    46874690    }
    46884691
    4689     aAccessError = Utf8StrFmt ("Hard disk location '%ls' is not yet created",
     4692    aAccessError = Utf8StrFmt ("Hard disk '%ls' is not yet created",
    46904693                               mLocation.raw());
    46914694    return S_OK;
     
    49494952            else if (VBOX_FAILURE (vrc))
    49504953                *aAccessError = Utf8StrFmt (
    4951                     tr ("Could not access hard disk image '%ls' (%Vrc)"),
     4954                    tr ("Could not access hard disk '%ls' (%Vrc)"),
    49524955                        mLocation.raw(), vrc);
    49534956        }
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r5101 r5115  
    49304930    <const name="CustomHardDisk" value="3">
    49314931      <desc>
    4932         Disk formats supported through plugins (the access type (
    4933         wether regular file in the host OS or something else) is up to
    4934         the plugin, see <link to="ICustomHardDisk"/>)
     4932        Disk formats supported through plugins (see
     4933        <link to="ICustomHardDisk"/>)
    49354934      </desc>
    49364935    </const>
     
    56005599        newly created hard disk objects, this value is <tt>null</tt>.
    56015600
    5602         When assigning a new path, it can be absolute (full path) or
    5603         relative to the <link to="IVirtualBox::homeFolder"> VirtualBox
    5604           home directory</link>. If only a file name without any path is
    5605         given, the <link to="ISystemProperties::defaultVDIFolder">
    5606           default VDI folder</link> will be used as a path to the image
    5607         file.
     5601        When assigning a new path, it can be absolute (full path) or relative
     5602        to the <link to="IVirtualBox::homeFolder"> VirtualBox home
     5603        directory</link>. If only a file name without any path is given,
     5604        the <link to="ISystemProperties::defaultVDIFolder"> default VDI
     5605        folder</link> will be used as a path to the image file.
    56085606
    56095607        When reading this propery, a full path is always returned.
     
    56115609        <note>
    56125610          This property cannot be changed when <link to="#created"/>
    5613           returns <tt>true</tt>. In this case, the specified file name can be
    5614           absolute (full path) or relative to
    5615           the <link to="IVirtualBox::homeFolder"> VirtualBox home
    5616           directory</link>.  If only a file name without any path is given,
    5617           the <link to="ISystemProperties::defaultVDIFolder"> default VDI
    5618           folder</link> will be used as a path to the image file.
     5611          returns <tt>true</tt>.
    56195612        </note>
    56205613
     
    58725865        <note>
    58735866          This property cannot be changed when <link to="#created"/>
    5874           returns <tt>true</tt>. In this case, the specified file name can be
    5875           absolute (full path) or relative to
    5876           the <link to="IVirtualBox::homeFolder"> VirtualBox home
    5877           directory</link>.  If only a file name without any path is given,
    5878           the <link to="ISystemProperties::defaultVDIFolder"> default VDI
    5879           folder</link> will be used as a path to the image file.
     5867          returns <tt>true</tt>.
    58805868        </note>
    58815869
     
    59835971
    59845972      The ICustomHardDisk interface represents <link to="IHardDisk">virtual hard
    5985       disks</link> that are supported through third-parite plugins.
    5986 
    5987       Hard disks using custom images can be opened using
     5973      disks</link> that are supported through third-party plugins.
     5974
     5975      Hard disks using custom hard disk images can be opened using
    59885976      <link to="IVirtualBox::openHardDisk()"/>.
    59895977
     
    60136001      <desc>
    60146002
    6015         Full location path of the custom image of this hard disk.
    6016 
    6017         When assigning a new path, it must be absolute (full path).
    6018         When reading this propery, a full path is always returned.
     6003        Location of this custom hard disk. For
     6004        newly created hard disk objects, this value is <tt>null</tt>.
     6005
     6006        The format of the location string is plugin-dependent. In case if the
     6007        plugin uses a regular file in the local file system to store hard disk
     6008        data, then the location is a file path and the following rules apply:
     6009        <ul>
     6010          <li>
     6011            when assigning a new path, it must be absolute (full path) or
     6012            relative to the <link to="IVirtualBox::homeFolder"> VirtualBox
     6013            home directory</link>.  If only a file name without any path is
     6014            given, the <link to="ISystemProperties::defaultVDIFolder"> default
     6015            VDI folder</link> will be used as a path to the image file.
     6016          </li>
     6017          <li>
     6018            When reading this propery, a full path is always returned.
     6019          </li>
     6020        </ul>
    60196021
    60206022        <note>
    60216023          This property cannot be changed when <link to="#created"/>
    6022           returns <tt>true</tt>. In this case, the specified file name can be
    6023           absolute (full path) or relative to
    6024           the <link to="IVirtualBox::homeFolder"> VirtualBox home
    6025           directory</link>.  If only a file name without any path is given,
    6026           the <link to="ISystemProperties::defaultVDIFolder"> default VDI
    6027           folder</link> will be used as a path to the image file.
     6024          returns <tt>true</tt>.
    60286025        </note>
    60296026
Note: See TracChangeset for help on using the changeset viewer.

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