VirtualBox

Ignore:
Timestamp:
Jul 24, 2019 8:32:32 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
132396
Message:

Storage: Added a desired format parameter to VDGetFormat() so Main can pass along the device type. Bumped the RAW backend down after the CUE and VISO to prevent (impossible) mixups of tiny files. Extended rawProbe() to look for a valid ISO-9660/UDF descriptor sequence on the image if the caller doesn't say it should be a floppy or hdd, only if that fail go by the extension. Note! the pfnProbe callback should probably get a score return parameter to indicate how confient the backend is about the probe result, as this would prevent the RAW backend from accidentally grabbing images which belongs to a plug-in. bugref:9151

File:
1 edited

Legend:

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

    r79961 r79965  
    76197619        if (isImport)
    76207620        {
     7621            VDTYPE const enmDesiredType = m->devType == DeviceType_Floppy   ? VDTYPE_FLOPPY
     7622                                        : m->devType == DeviceType_DVD      ? VDTYPE_OPTICAL_DISC
     7623                                        : m->devType == DeviceType_HardDisk ? VDTYPE_HDD : VDTYPE_INVALID;
    76217624            VDTYPE enmType = VDTYPE_INVALID;
    76227625            char *backendName = NULL;
     
    76347637            {
    76357638                vrc = VDGetFormat(NULL /* pVDIfsDisk */, NULL /* pVDIfsImage */,
    7636                                   locationFull.c_str(), &backendName, &enmType);
     7639                                  locationFull.c_str(), enmDesiredType, &backendName, &enmType);
    76377640            }
    76387641            else if (   vrc != VERR_FILE_NOT_FOUND
     
    76447647                locationFull = aLocation;
    76457648                vrc = VDGetFormat(NULL /* pVDIfsDisk */, NULL /* pVDIfsImage */,
    7646                                   locationFull.c_str(), &backendName, &enmType);
     7649                                  locationFull.c_str(), enmDesiredType, &backendName, &enmType);
    76477650            }
    76487651
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