VirtualBox

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


Ignore:
Timestamp:
Sep 4, 2019 2:05:50 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
133105
Message:

Runtime: Some renaming to stay consistent (*Get* always returns what is asked for while *Query* returns a status code and where to store the value on success is given as a pointer)

  • RTVfsFileGetSize -> RTVfsFileQuerySize
  • RTFileQuerySize -> RTFileQuerySizeByPath
  • RTFileGetSize -> RTFileQuerySize
  • RTFileGetSizeMaxEx -> RTFileQuerySizeMaxEx
Location:
trunk/src/VBox/Main
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-all/TextScript.cpp

    r76553 r80585  
    6565    HRESULT  hrc;
    6666    uint64_t cbFile = 0;
    67     int vrc = RTVfsFileGetSize(hVfsFile, &cbFile);
     67    int vrc = RTVfsFileQuerySize(hVfsFile, &cbFile);
    6868    if (   RT_SUCCESS(vrc)
    6969        && cbFile < _16M)
     
    108108                                      mpSetError->tr("'%s' is too big (max 16MB): %'RU64"), pszFilename, cbFile);
    109109    else
    110         hrc = mpSetError->setErrorVrc(vrc, mpSetError->tr("RTVfsFileGetSize failed (%Rrc)"), vrc);
     110        hrc = mpSetError->setErrorVrc(vrc, mpSetError->tr("RTVfsFileQuerySize failed (%Rrc)"), vrc);
    111111    return hrc;
    112112}
  • trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp

    r80360 r80585  
    39693969                RTFOFF maxSize;
    39703970                /* Careful: This function will work only on selected local file systems! */
    3971                 rc = RTFileGetMaxSizeEx(file, &maxSize);
     3971                rc = RTFileQueryMaxSizeEx(file, &maxSize);
    39723972                RTFileClose(file);
    39733973                if (   RT_SUCCESS(rc)
  • trunk/src/VBox/Main/src-client/GuestSessionImplTasks.cpp

    r79418 r80585  
    19791979    {
    19801980        uint64_t cbSrcSize = 0;
    1981         rc = RTVfsFileGetSize(hVfsFile, &cbSrcSize);
     1981        rc = RTVfsFileQuerySize(hVfsFile, &cbSrcSize);
    19821982        if (RT_SUCCESS(rc))
    19831983        {
  • trunk/src/VBox/Main/src-server/MachineImplCloneVM.cpp

    r76553 r80585  
    222222        sst.strSaveStateFile = bstrSrcSaveStatePath;
    223223        uint64_t cbSize;
    224         int vrc = RTFileQuerySize(sst.strSaveStateFile.c_str(), &cbSize);
     224        int vrc = RTFileQuerySizeByPath(sst.strSaveStateFile.c_str(), &cbSize);
    225225        if (RT_FAILURE(vrc))
    226226            return p->setErrorBoth(VBOX_E_IPRT_ERROR, vrc, p->tr("Could not query file size of '%s' (%Rrc)"),
  • trunk/src/VBox/Main/src-server/MachineImplMoveVM.cpp

    r79956 r80585  
    393393            if (name.contains(strSettingsFilePath))
    394394            {
    395                 vrc = RTFileQuerySize(name.c_str(), &cbFile);
     395                vrc = RTFileQuerySizeByPath(name.c_str(), &cbFile);
    396396                if (RT_SUCCESS(vrc))
    397397                {
     
    448448
    449449                    uint64_t cbFile = 0;
    450                     vrc = RTFileQuerySize(strFile.c_str(), &cbFile);
     450                    vrc = RTFileQuerySizeByPath(strFile.c_str(), &cbFile);
    451451                    if (RT_SUCCESS(vrc))
    452452                    {
     
    12971297                Utf8Str fullPath =  it->first;
    12981298                fullPath.append(RTPATH_DELIMITER).append(it->second);
    1299                 vrc = RTFileQuerySize(fullPath.c_str(), &cbFile);
     1299                vrc = RTFileQuerySizeByPath(fullPath.c_str(), &cbFile);
    13001300                if (RT_SUCCESS(vrc))
    13011301                {
     
    14821482        uint64_t cbSize;
    14831483
    1484         int vrc = RTFileQuerySize(sst.strSaveStateFile.c_str(), &cbSize);
     1484        int vrc = RTFileQuerySizeByPath(sst.strSaveStateFile.c_str(), &cbSize);
    14851485        if (RT_FAILURE(vrc))
    14861486            return m_pMachine->setErrorBoth(VBOX_E_IPRT_ERROR, vrc,
  • trunk/src/VBox/Main/src-server/MediumImpl.cpp

    r79968 r80585  
    55475547        if (i_isMediumFormatFile() && pOther->i_isMediumFormatFile())
    55485548        {
    5549             vrc = RTFileQuerySize(this->i_getLocationFull().c_str(), &cbMediumThis);
     5549            vrc = RTFileQuerySizeByPath(this->i_getLocationFull().c_str(), &cbMediumThis);
    55505550            if (RT_SUCCESS(vrc))
    55515551            {
    5552                 vrc = RTFileQuerySize(pOther->i_getLocationFull().c_str(),
     5552                vrc = RTFileQuerySizeByPath(pOther->i_getLocationFull().c_str(),
    55535553                                      &cbMediumOther);
    55545554            }
  • trunk/src/VBox/Main/src-server/generic/AutostartDb-generic.cpp

    r80569 r80585  
    7272                 * should be really really small. Anything else is bogus.
    7373                 */
    74                 rc = RTFileGetSize(hAutostartFile, &cbFile);
     74                rc = RTFileQuerySize(hAutostartFile, &cbFile);
    7575                if (   RT_SUCCESS(rc)
    7676                    && cbFile <= 16)
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