VirtualBox

Changeset 31570 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Aug 11, 2010 1:42:06 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
64674
Message:

Main: fix for missing UUIDs for dvd and floppy media

File:
1 edited

Legend:

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

    r31568 r31570  
    789789         * Created state here and also add it to the registry */
    790790        m->state = MediumState_Created;
     791        // create new UUID
    791792        unconst(m->id).create();
    792793
     
    807808 * read/write or read-only.
    808809 *
    809  * This gets called by VirtualBox::OpenHardDisk(), OpenDVDImage and OpenFloppyImage();
    810  * this also gets called by Machine::AttachDevice() and createImplicitDiffs()
    811  * when new diff images are created.
    812  *
    813  * Note that the UUID, format and the parent of this medium will be
    814  * determined when reading the medium storage unit, unless new values are
    815  * specified by the parameters. If the detected or set parent is
    816  * not known to VirtualBox, then this method will fail.
     810 * This gets called by VirtualBox::OpenMedium() and also by
     811 * Machine::AttachDevice() and createImplicitDiffs() when new diff
     812 * images are created.
     813 *
     814 * For hard disks, the UUID, format and the parent of this medium will be
     815 * determined when reading the medium storage unit. For DVD and floppy images,
     816 * which have no UUIDs in their storage units, new UUIDs are created.
     817 * If the detected or set parent is not known to VirtualBox, then this method
     818 * will fail.
    817819 *
    818820 * @param aVirtualBox   VirtualBox object.
     
    855857        rc = setLocation(aLocation, "RAW");
    856858    if (FAILED(rc)) return rc;
     859
     860    if (    aDeviceType == DeviceType_DVD
     861         || aDeviceType == DeviceType_Floppy)
     862        // create new UUID
     863        unconst(m->id).create();
    857864
    858865    /* get all the information about the medium from the storage unit */
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