VirtualBox

Changeset 80585 in vbox for trunk/src/VBox/Runtime/r3


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/Runtime/r3
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/fileio.cpp

    r77825 r80585  
    227227 *          -1 on failure, the file position is undefined.
    228228 * @param   File        Handle to the file.
    229  * @see     RTFileGetMaxSizeEx.
     229 * @see     RTFileQueryMaxSizeEx.
    230230 */
    231231RTR3DECL(RTFOFF) RTFileGetMaxSize(RTFILE File)
    232232{
    233233    RTFOFF cbMax;
    234     int rc = RTFileGetMaxSizeEx(File, &cbMax);
     234    int rc = RTFileQueryMaxSizeEx(File, &cbMax);
    235235    return RT_SUCCESS(rc) ? cbMax : -1;
    236236}
     
    317317     */
    318318    uint64_t cbFile1;
    319     int rc = RTFileGetSize(hFile1, &cbFile1);
     319    int rc = RTFileQuerySize(hFile1, &cbFile1);
    320320    if (RT_FAILURE(rc))
    321321        return rc;
    322322
    323323    uint64_t cbFile2;
    324     rc = RTFileGetSize(hFile1, &cbFile2);
     324    rc = RTFileQuerySize(hFile1, &cbFile2);
    325325    if (RT_FAILURE(rc))
    326326        return rc;
  • trunk/src/VBox/Runtime/r3/posix/fileio-posix.cpp

    r79155 r80585  
    670670
    671671
    672 RTR3DECL(int) RTFileGetSize(RTFILE hFile, uint64_t *pcbSize)
     672RTR3DECL(int) RTFileQuerySize(RTFILE hFile, uint64_t *pcbSize)
    673673{
    674674    /*
     
    746746
    747747
    748 RTR3DECL(int) RTFileGetMaxSizeEx(RTFILE hFile, PRTFOFF pcbMax)
     748RTR3DECL(int) RTFileQueryMaxSizeEx(RTFILE hFile, PRTFOFF pcbMax)
    749749{
    750750    /*
  • trunk/src/VBox/Runtime/r3/win/fileio-win.cpp

    r79155 r80585  
    798798
    799799
    800 RTR3DECL(int)  RTFileGetSize(RTFILE hFile, uint64_t *pcbSize)
     800RTR3DECL(int)  RTFileQuerySize(RTFILE hFile, uint64_t *pcbSize)
    801801{
    802802    /*
     
    849849
    850850
    851 RTR3DECL(int) RTFileGetMaxSizeEx(RTFILE hFile, PRTFOFF pcbMax)
     851RTR3DECL(int) RTFileQueryMaxSizeEx(RTFILE hFile, PRTFOFF pcbMax)
    852852{
    853853    /** @todo r=bird:
  • trunk/src/VBox/Runtime/r3/xml.cpp

    r79677 r80585  
    22902290        /* Make a backup of any existing file (ignore failure). */
    22912291        uint64_t cbPrevFile;
    2292         rc = RTFileQuerySize(pcszFilename, &cbPrevFile);
     2292        rc = RTFileQuerySizeByPath(pcszFilename, &cbPrevFile);
    22932293        if (RT_SUCCESS(rc) && cbPrevFile >= 16)
    22942294            RTFileRename(pcszFilename, szPrevFilename, RTPATHRENAME_FLAGS_REPLACE);
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