VirtualBox

Changeset 85887 in vbox for trunk/src/VBox/Runtime


Ignore:
Timestamp:
Aug 25, 2020 9:05:37 PM (4 years ago)
Author:
vboxsync
Message:

IPRT/RTDvm: Added RTDVMVOLIDX_HOST index. bugref:9224

Location:
trunk/src/VBox/Runtime
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/dvm/dvm.cpp

    r85877 r85887  
    737737    AssertReturn(enmIndex > RTDVMVOLIDX_INVALID && enmIndex < RTDVMVOLIDX_END, UINT32_MAX);
    738738
     739    if (enmIndex == RTDVMVOLIDX_HOST)
     740    {
     741#ifdef RT_OS_WINDOWS
     742        enmIndex = RTDVMVOLIDX_USER_VISIBLE;
     743#elif defined(RT_OS_LINUX) || defined(RT_OS_FREEBSD) || defined(RT_OS_SOLARIS) || defined(RT_OS_DARWIN)
     744/** @todo verify darwin, solaris and freebsd matches the linux algo. Check the linux index matching actual linux. */
     745        enmIndex = RTDVMVOLIDX_LINUX;
     746#else
     747# error "PORTME"
     748#endif
     749    }
     750
    739751    return pThis->pVolMgr->pDvmFmtOps->pfnVolumeGetIndex(pThis->hVolFmt, enmIndex);
    740752}
  • trunk/src/VBox/Runtime/common/dvm/dvmbsdlabel.cpp

    r85877 r85887  
    528528
    529529        case RTDVMVOLIDX_INVALID:
     530        case RTDVMVOLIDX_HOST:
    530531        case RTDVMVOLIDX_END:
    531532        case RTDVMVOLIDX_32BIT_HACK:
  • trunk/src/VBox/Runtime/common/dvm/dvmgpt.cpp

    r85877 r85887  
    558558            return pVol->idxEntry;
    559559
     560        case RTDVMVOLIDX_INVALID:
     561        case RTDVMVOLIDX_HOST:
     562        case RTDVMVOLIDX_END:
    560563        case RTDVMVOLIDX_32BIT_HACK:
    561         case RTDVMVOLIDX_INVALID:
    562         case RTDVMVOLIDX_END:
    563564            break;
    564565        /* no default! */
  • trunk/src/VBox/Runtime/common/dvm/dvmmbr.cpp

    r85878 r85887  
    825825
    826826        case RTDVMVOLIDX_INVALID:
     827        case RTDVMVOLIDX_HOST:
    827828        case RTDVMVOLIDX_END:
    828829        case RTDVMVOLIDX_32BIT_HACK:
  • trunk/src/VBox/Runtime/include/internal/dvm.h

    r85879 r85887  
    273273     * @returns The requested index. UINT32_MAX on failure.
    274274     * @param   hVolFmt         The format specific volume handle.
    275      * @param   enmIndex        The index to get.
     275     * @param   enmIndex        The index to get. Never RTDVMVOLIDX_HOST.
    276276     * @sa RTDvmVolumeGetIndex
    277277     */
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