VirtualBox

Changeset 98281 in vbox for trunk/src


Ignore:
Timestamp:
Jan 24, 2023 12:15:49 PM (23 months ago)
Author:
vboxsync
Message:

Main/src-helper-apps: rc -> hrc/vrc. Make scm check this dir now. bugref:10223

Location:
trunk/src/VBox/Main
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/.scm-settings

    r98280 r98281  
    5656/src-client/*cpp: --no-rc-use
    5757/src-global/*cpp: --no-rc-use
     58/src-helper-apps/*cpp: --no-rc-use
    5859
    5960# IDL and XML
  • trunk/src/VBox/Main/src-helper-apps/OpenGLTest/OpenGLTest.cpp

    r98103 r98281  
    5050    static char pszVBoxPath[RTPATH_MAX];
    5151    const char *papszArgs[4] = { NULL, "-test", "3D", NULL};
    52     int rc;
    53     RTPROCESS Process;
    54     RTPROCSTATUS ProcStatus;
    55     uint64_t StartTS;
    5652
    5753#ifdef __SANITIZE_ADDRESS__
     
    6359    RTEnvPutEx(env, "ASAN_OPTIONS=detect_leaks=0");  /* If this fails we will notice later */
    6460#endif
    65     rc = RTPathExecDir(pszVBoxPath, RTPATH_MAX); AssertRCReturn(rc, false);
     61    int vrc = RTPathExecDir(pszVBoxPath, RTPATH_MAX);
     62    AssertRCReturn(vrc, false);
    6663#if defined(RT_OS_WINDOWS) || defined(RT_OS_OS2)
    67     rc = RTPathAppend(pszVBoxPath, RTPATH_MAX, "VBoxTestOGL.exe");
     64    vrc = RTPathAppend(pszVBoxPath, RTPATH_MAX, "VBoxTestOGL.exe");
    6865#else
    69     rc = RTPathAppend(pszVBoxPath, RTPATH_MAX, "VBoxTestOGL");
     66    vrc = RTPathAppend(pszVBoxPath, RTPATH_MAX, "VBoxTestOGL");
    7067#endif
    7168    papszArgs[0] = pszVBoxPath;         /* argv[0] */
    72     AssertRCReturn(rc, false);
     69    AssertRCReturn(vrc, false);
    7370
     71    RTPROCESS Process;
    7472#ifndef __SANITIZE_ADDRESS__
    75     rc = RTProcCreate(pszVBoxPath, papszArgs, RTENV_DEFAULT, 0, &Process);
     73    vrc = RTProcCreate(pszVBoxPath, papszArgs, RTENV_DEFAULT, 0, &Process);
    7674#else
    77     rc = RTProcCreate(pszVBoxPath, papszArgs, env, 0, &Process);
     75    vrc = RTProcCreate(pszVBoxPath, papszArgs, env, 0, &Process);
    7876    RTEnvDestroy(env);
    7977#endif
    80     if (RT_FAILURE(rc))
     78    if (RT_FAILURE(vrc))
    8179        return false;
    8280
    83     StartTS = RTTimeMilliTS();
     81    uint64_t StartTS = RTTimeMilliTS();
    8482
     83    RTPROCSTATUS ProcStatus = {0};
    8584    while (1)
    8685    {
    87         rc = RTProcWait(Process, RTPROCWAIT_FLAGS_NOBLOCK, &ProcStatus);
    88         if (rc != VERR_PROCESS_RUNNING)
     86        vrc = RTProcWait(Process, RTPROCWAIT_FLAGS_NOBLOCK, &ProcStatus);
     87        if (vrc != VERR_PROCESS_RUNNING)
    8988            break;
    9089
     
    101100    }
    102101
    103     if (RT_SUCCESS(rc))
    104     {
    105         if ((ProcStatus.enmReason==RTPROCEXITREASON_NORMAL) && (ProcStatus.iStatus==0))
    106         {
     102    if (RT_SUCCESS(vrc))
     103        if (   ProcStatus.enmReason == RTPROCEXITREASON_NORMAL
     104            && ProcStatus.iStatus   == 0)
    107105            return true;
    108         }
    109     }
    110106
    111107    return false;
  • trunk/src/VBox/Main/src-helper-apps/OpenGLTest/OpenGLTestApp.cpp

    r98103 r98281  
    164164DECLINLINE(PFNRT) vboxTestOglGetProc(const char *pszSymbol)
    165165{
    166     int rc;
     166    int vrc;
    167167
    168168#ifdef RT_OS_WINDOWS
     
    170170    if (s_hOpenGL32 == NULL)
    171171    {
    172         rc = RTLdrLoadSystem("opengl32", /* fNoUnload = */ true, &s_hOpenGL32);
    173         if (RT_FAILURE(rc))
     172        vrc = RTLdrLoadSystem("opengl32", /* fNoUnload = */ true, &s_hOpenGL32);
     173        if (RT_FAILURE(vrc))
    174174           s_hOpenGL32 = NULL;
    175175    }
     
    181181        if (s_hOpenGL32 != NULL)
    182182        {
    183             rc = RTLdrGetSymbol(s_hOpenGL32, "wglGetProcAddress", (void **)&s_wglGetProcAddress);
    184             if (RT_FAILURE(rc))
     183            vrc = RTLdrGetSymbol(s_hOpenGL32, "wglGetProcAddress", (void **)&s_wglGetProcAddress);
     184            if (RT_FAILURE(vrc))
    185185               s_wglGetProcAddress = NULL;
    186186        }
     
    195195
    196196        /* Might be an exported symbol. */
    197         rc = RTLdrGetSymbol(s_hOpenGL32, pszSymbol, (void **)&p);
    198         if (RT_SUCCESS(rc))
     197        vrc = RTLdrGetSymbol(s_hOpenGL32, pszSymbol, (void **)&p);
     198        if (RT_SUCCESS(vrc))
    199199            return p;
    200200    }
     
    204204    {
    205205        static const char s_szLibGL[] = "libGL.so.1";
    206         rc = RTLdrLoadEx(s_szLibGL, &s_hGL, RTLDRLOAD_FLAGS_GLOBAL | RTLDRLOAD_FLAGS_NO_UNLOAD, NULL);
    207         if (RT_FAILURE(rc))
     206        vrc = RTLdrLoadEx(s_szLibGL, &s_hGL, RTLDRLOAD_FLAGS_GLOBAL | RTLDRLOAD_FLAGS_NO_UNLOAD, NULL);
     207        if (RT_FAILURE(vrc))
    208208        {
    209209            s_hGL = NULL;
     
    216216    if (s_glXGetProcAddress == NULL)
    217217    {
    218         rc = RTLdrGetSymbol(s_hGL, "glXGetProcAddress", (void **)&s_glXGetProcAddress);
    219         if (RT_FAILURE(rc))
     218        vrc = RTLdrGetSymbol(s_hGL, "glXGetProcAddress", (void **)&s_glXGetProcAddress);
     219        if (RT_FAILURE(vrc))
    220220        {
    221221            s_glXGetProcAddress = NULL;
     
    229229
    230230    /* Might be an exported symbol. */
    231     rc = RTLdrGetSymbol(s_hGL, pszSymbol, (void **)&p);
    232     if (RT_SUCCESS(rc))
     231    vrc = RTLdrGetSymbol(s_hGL, pszSymbol, (void **)&p);
     232    if (RT_SUCCESS(vrc))
    233233        return p;
    234234#endif
     
    390390    RTR3InitExe(argc, &argv, 0);
    391391
    392     int rc = 0;
     392    int vrc = 0;
    393393    if (argc < 2)
    394394    {
    395395        /* backwards compatibility: check 3D */
    396         rc = vboxCheck3DAccelerationSupported();
     396        vrc = vboxCheck3DAccelerationSupported();
    397397    }
    398398    else
     
    409409
    410410        RTGETOPTSTATE State;
    411         rc = RTGetOptInit(&State, argc, argv, &s_aOptionDefs[0], RT_ELEMENTS(s_aOptionDefs), 1, 0);
    412         AssertRCReturn(rc, 49);
     411        vrc = RTGetOptInit(&State, argc, argv, &s_aOptionDefs[0], RT_ELEMENTS(s_aOptionDefs), 1, 0);
     412        AssertRCReturn(vrc, 49);
    413413
    414414#ifdef VBOX_WITH_VIDEOHWACCEL
    415         bool bTest2D = false;
    416 #endif
    417         bool bTest3D = false;
    418 #ifdef VBOXGLTEST_WITH_LOGGING
    419         bool bLog = false;
    420         bool bLogSuffix = false;
     415        bool fTest2D = false;
     416#endif
     417        bool fTest3D = false;
     418#ifdef VBOXGLTEST_WITH_LOGGING
     419        bool fLog = false;
     420        bool fLogSuffix = false;
    421421        const char * pLog = NULL;
    422422#endif
     
    425425        {
    426426            RTGETOPTUNION Val;
    427             rc = RTGetOpt(&State, &Val);
    428             if (!rc)
     427            vrc = RTGetOpt(&State, &Val);
     428            if (!vrc)
    429429                break;
    430             switch (rc)
     430            switch (vrc)
    431431            {
    432432                case 't':
    433433                    if (!strcmp(Val.psz, "3D") || !strcmp(Val.psz, "3d"))
    434                         bTest3D = true;
     434                        fTest3D = true;
    435435#ifdef VBOX_WITH_VIDEOHWACCEL
    436436                    else if (!strcmp(Val.psz, "2D") || !strcmp(Val.psz, "2d"))
    437                         bTest2D = true;
     437                        fTest2D = true;
    438438#endif
    439439                    else
     
    443443#ifdef VBOXGLTEST_WITH_LOGGING
    444444                case 'l':
    445                     bLog = true;
     445                    fLog = true;
    446446                    pLog = Val.psz;
    447447                    break;
    448448                case 'L':
    449                     bLog = true;
     449                    fLog = true;
    450450                    pLog = NULL;
    451451                    break;
     
    478478                case VINF_GETOPT_NOT_OPTION:
    479479                default:
    480                     return RTGetOptPrintError(rc, &Val);
     480                    return RTGetOptPrintError(vrc, &Val);
    481481            }
    482482        }
     
    486486         */
    487487#ifdef VBOXGLTEST_WITH_LOGGING
    488         if (!bLog)
     488        if (!fLog)
    489489        {
    490490            /* check the VBOXGLTEST_LOG env var */
    491491            pLog = RTEnvGet("VBOXGLTEST_LOG");
    492492            if(pLog)
    493                 bLog = true;
    494             bLogSuffix = true;
    495         }
    496         if (bLog)
    497             rc = vboxInitLogging(pLog, bLogSuffix);
     493                fLog = true;
     494            fLogSuffix = true;
     495        }
     496        if (fLog)
     497            vrc = vboxInitLogging(pLog, fLogSuffix);
    498498        else
    499499#endif
    500             rc = vboxInitQuietMode();
     500            vrc = vboxInitQuietMode();
    501501
    502502        /*
    503503         * Do the job.
    504504         */
    505         if (!rc && bTest3D)
    506             rc = vboxCheck3DAccelerationSupported();
     505        if (!vrc && fTest3D)
     506            vrc = vboxCheck3DAccelerationSupported();
    507507
    508508#ifdef VBOX_WITH_VIDEOHWACCEL
    509         if (!rc && bTest2D)
    510             rc = vboxCheck2DVideoAccelerationSupported();
     509        if (!vrc && fTest2D)
     510            vrc = vboxCheck2DVideoAccelerationSupported();
    511511#endif
    512512    }
    513513
    514514    /*RTR3Term();*/
    515     return rc;
     515    return vrc;
    516516
    517517}
  • trunk/src/VBox/Main/src-helper-apps/OpenGLTest/OpenGLTestDarwin.cpp

    r98103 r98281  
    102102    static RTONCE s_Once = RTONCE_INITIALIZER;
    103103    static bool   s_fCached = false;
    104     int rc = RTOnce(&s_Once, vboxOglIsOfflineRenderingAppropriateOnce, &s_fCached);
    105     AssertRC(rc);
     104    int vrc = RTOnce(&s_Once, vboxOglIsOfflineRenderingAppropriateOnce, &s_fCached);
     105    AssertRC(vrc);
    106106    return s_fCached;
    107107}
  • trunk/src/VBox/Main/src-helper-apps/OpenGLTest/VBoxGLSupportInfo.cpp

    r98103 r98281  
    356356void VBoxGLInfo::initExtSupport(const MY_QOpenGLContext &context)
    357357{
    358     int rc = 0;
     358    int vrc = VINF_SUCCESS;
    359359    do
    360360    {
    361         rc = 0;
    362361        mMultiTexNumSupported = 1; /* default, 1 means not supported */
    363362        if(mGLVersion >= 0x010201) /* ogl >= 1.2.1 */
    364363        {
    365             VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_ACTIVE_TEXTURE, ActiveTexture, rc);
    366             VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_MULTI_TEX_COORD2I, MultiTexCoord2i, rc);
    367             VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_MULTI_TEX_COORD2D, MultiTexCoord2d, rc);
    368             VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_MULTI_TEX_COORD2F, MultiTexCoord2f, rc);
     364            VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_ACTIVE_TEXTURE, ActiveTexture, vrc);
     365            VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_MULTI_TEX_COORD2I, MultiTexCoord2i, vrc);
     366            VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_MULTI_TEX_COORD2D, MultiTexCoord2d, vrc);
     367            VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_MULTI_TEX_COORD2F, MultiTexCoord2f, vrc);
    369368        }
    370369        else if(m_GL_ARB_multitexture)
    371370        {
    372             VBOXVHWA_PFNINIT_ARB(context, PFNVBOXVHWA_ACTIVE_TEXTURE, ActiveTexture, rc);
    373             VBOXVHWA_PFNINIT_ARB(context, PFNVBOXVHWA_MULTI_TEX_COORD2I, MultiTexCoord2i, rc);
    374             VBOXVHWA_PFNINIT_ARB(context, PFNVBOXVHWA_MULTI_TEX_COORD2D, MultiTexCoord2d, rc);
    375             VBOXVHWA_PFNINIT_ARB(context, PFNVBOXVHWA_MULTI_TEX_COORD2F, MultiTexCoord2f, rc);
     371            VBOXVHWA_PFNINIT_ARB(context, PFNVBOXVHWA_ACTIVE_TEXTURE, ActiveTexture, vrc);
     372            VBOXVHWA_PFNINIT_ARB(context, PFNVBOXVHWA_MULTI_TEX_COORD2I, MultiTexCoord2i, vrc);
     373            VBOXVHWA_PFNINIT_ARB(context, PFNVBOXVHWA_MULTI_TEX_COORD2D, MultiTexCoord2d, vrc);
     374            VBOXVHWA_PFNINIT_ARB(context, PFNVBOXVHWA_MULTI_TEX_COORD2F, MultiTexCoord2f, vrc);
    376375        }
    377376        else
     
    380379        }
    381380
    382         if(RT_FAILURE(rc))
     381        if(RT_FAILURE(vrc))
    383382            break;
    384383
     
    403402    do
    404403    {
    405         rc = 0;
     404        vrc = 0;
    406405        mPBOSupported = false;
    407406
    408407        if(m_GL_ARB_pixel_buffer_object)
    409408        {
    410             VBOXVHWA_PFNINIT_ARB(context, PFNVBOXVHWA_GEN_BUFFERS, GenBuffers, rc);
    411             VBOXVHWA_PFNINIT_ARB(context, PFNVBOXVHWA_DELETE_BUFFERS, DeleteBuffers, rc);
    412             VBOXVHWA_PFNINIT_ARB(context, PFNVBOXVHWA_BIND_BUFFER, BindBuffer, rc);
    413             VBOXVHWA_PFNINIT_ARB(context, PFNVBOXVHWA_BUFFER_DATA, BufferData, rc);
    414             VBOXVHWA_PFNINIT_ARB(context, PFNVBOXVHWA_MAP_BUFFER, MapBuffer, rc);
    415             VBOXVHWA_PFNINIT_ARB(context, PFNVBOXVHWA_UNMAP_BUFFER, UnmapBuffer, rc);
     409            VBOXVHWA_PFNINIT_ARB(context, PFNVBOXVHWA_GEN_BUFFERS, GenBuffers, vrc);
     410            VBOXVHWA_PFNINIT_ARB(context, PFNVBOXVHWA_DELETE_BUFFERS, DeleteBuffers, vrc);
     411            VBOXVHWA_PFNINIT_ARB(context, PFNVBOXVHWA_BIND_BUFFER, BindBuffer, vrc);
     412            VBOXVHWA_PFNINIT_ARB(context, PFNVBOXVHWA_BUFFER_DATA, BufferData, vrc);
     413            VBOXVHWA_PFNINIT_ARB(context, PFNVBOXVHWA_MAP_BUFFER, MapBuffer, vrc);
     414            VBOXVHWA_PFNINIT_ARB(context, PFNVBOXVHWA_UNMAP_BUFFER, UnmapBuffer, vrc);
    416415        }
    417416        else
     
    420419        }
    421420
    422         if(RT_FAILURE(rc))
     421        if(RT_FAILURE(vrc))
    423422            break;
    424423
     
    428427    do
    429428    {
    430         rc = 0;
     429        vrc = 0;
    431430        mFragmentShaderSupported = false;
    432431
    433432        if(mGLVersion >= 0x020000)  /* if ogl >= 2.0*/
    434433        {
    435             VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_CREATE_SHADER, CreateShader, rc);
    436             VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_SHADER_SOURCE, ShaderSource, rc);
    437             VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_COMPILE_SHADER, CompileShader, rc);
    438             VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_DELETE_SHADER, DeleteShader, rc);
    439 
    440             VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_CREATE_PROGRAM, CreateProgram, rc);
    441             VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_ATTACH_SHADER, AttachShader, rc);
    442             VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_DETACH_SHADER, DetachShader, rc);
    443             VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_LINK_PROGRAM, LinkProgram, rc);
    444             VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_USE_PROGRAM, UseProgram, rc);
    445             VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_DELETE_PROGRAM, DeleteProgram, rc);
    446 
    447             VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_IS_SHADER, IsShader, rc);
    448             VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_GET_SHADERIV, GetShaderiv, rc);
    449             VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_IS_PROGRAM, IsProgram, rc);
    450             VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_GET_PROGRAMIV, GetProgramiv, rc);
    451             VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_GET_ATTACHED_SHADERS, GetAttachedShaders,  rc);
    452             VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_GET_SHADER_INFO_LOG, GetShaderInfoLog, rc);
    453             VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_GET_PROGRAM_INFO_LOG, GetProgramInfoLog, rc);
    454 
    455             VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_GET_UNIFORM_LOCATION, GetUniformLocation, rc);
    456 
    457             VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_UNIFORM1F, Uniform1f, rc);
    458             VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_UNIFORM2F, Uniform2f, rc);
    459             VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_UNIFORM3F, Uniform3f, rc);
    460             VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_UNIFORM4F, Uniform4f, rc);
    461 
    462             VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_UNIFORM1I, Uniform1i, rc);
    463             VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_UNIFORM2I, Uniform2i, rc);
    464             VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_UNIFORM3I, Uniform3i, rc);
    465             VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_UNIFORM4I, Uniform4i, rc);
     434            VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_CREATE_SHADER, CreateShader, vrc);
     435            VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_SHADER_SOURCE, ShaderSource, vrc);
     436            VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_COMPILE_SHADER, CompileShader, vrc);
     437            VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_DELETE_SHADER, DeleteShader, vrc);
     438
     439            VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_CREATE_PROGRAM, CreateProgram, vrc);
     440            VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_ATTACH_SHADER, AttachShader, vrc);
     441            VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_DETACH_SHADER, DetachShader, vrc);
     442            VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_LINK_PROGRAM, LinkProgram, vrc);
     443            VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_USE_PROGRAM, UseProgram, vrc);
     444            VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_DELETE_PROGRAM, DeleteProgram, vrc);
     445
     446            VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_IS_SHADER, IsShader, vrc);
     447            VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_GET_SHADERIV, GetShaderiv, vrc);
     448            VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_IS_PROGRAM, IsProgram, vrc);
     449            VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_GET_PROGRAMIV, GetProgramiv, vrc);
     450            VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_GET_ATTACHED_SHADERS, GetAttachedShaders,  vrc);
     451            VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_GET_SHADER_INFO_LOG, GetShaderInfoLog, vrc);
     452            VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_GET_PROGRAM_INFO_LOG, GetProgramInfoLog, vrc);
     453
     454            VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_GET_UNIFORM_LOCATION, GetUniformLocation, vrc);
     455
     456            VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_UNIFORM1F, Uniform1f, vrc);
     457            VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_UNIFORM2F, Uniform2f, vrc);
     458            VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_UNIFORM3F, Uniform3f, vrc);
     459            VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_UNIFORM4F, Uniform4f, vrc);
     460
     461            VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_UNIFORM1I, Uniform1i, vrc);
     462            VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_UNIFORM2I, Uniform2i, vrc);
     463            VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_UNIFORM3I, Uniform3i, vrc);
     464            VBOXVHWA_PFNINIT_SAME(context, PFNVBOXVHWA_UNIFORM4I, Uniform4i, vrc);
    466465        }
    467466        else if(m_GL_ARB_shader_objects && m_GL_ARB_fragment_shader)
    468467        {
    469             VBOXVHWA_PFNINIT_OBJECT_ARB(context, PFNVBOXVHWA_CREATE_SHADER, CreateShader, rc);
    470             VBOXVHWA_PFNINIT_ARB(context, PFNVBOXVHWA_SHADER_SOURCE, ShaderSource, rc);
    471             VBOXVHWA_PFNINIT_ARB(context, PFNVBOXVHWA_COMPILE_SHADER, CompileShader, rc);
    472             VBOXVHWA_PFNINIT(context, PFNVBOXVHWA_DELETE_SHADER, DeleteShader, DeleteObjectARB, rc);
    473 
    474             VBOXVHWA_PFNINIT_OBJECT_ARB(context, PFNVBOXVHWA_CREATE_PROGRAM, CreateProgram, rc);
    475             VBOXVHWA_PFNINIT(context, PFNVBOXVHWA_ATTACH_SHADER, AttachShader, AttachObjectARB, rc);
    476             VBOXVHWA_PFNINIT(context, PFNVBOXVHWA_DETACH_SHADER, DetachShader, DetachObjectARB, rc);
    477             VBOXVHWA_PFNINIT_ARB(context, PFNVBOXVHWA_LINK_PROGRAM, LinkProgram, rc);
    478             VBOXVHWA_PFNINIT_OBJECT_ARB(context, PFNVBOXVHWA_USE_PROGRAM, UseProgram, rc);
    479             VBOXVHWA_PFNINIT(context, PFNVBOXVHWA_DELETE_PROGRAM, DeleteProgram, DeleteObjectARB, rc);
    480 
    481         /// @todo    VBOXVHWA_PFNINIT(PFNVBOXVHWA_IS_SHADER, IsShader, rc);
    482             VBOXVHWA_PFNINIT(context, PFNVBOXVHWA_GET_SHADERIV, GetShaderiv, GetObjectParameterivARB, rc);
    483         /// @todo    VBOXVHWA_PFNINIT(PFNVBOXVHWA_IS_PROGRAM, IsProgram, rc);
    484             VBOXVHWA_PFNINIT(context, PFNVBOXVHWA_GET_PROGRAMIV, GetProgramiv, GetObjectParameterivARB, rc);
    485             VBOXVHWA_PFNINIT(context, PFNVBOXVHWA_GET_ATTACHED_SHADERS, GetAttachedShaders, GetAttachedObjectsARB, rc);
    486             VBOXVHWA_PFNINIT(context, PFNVBOXVHWA_GET_SHADER_INFO_LOG, GetShaderInfoLog, GetInfoLogARB, rc);
    487             VBOXVHWA_PFNINIT(context, PFNVBOXVHWA_GET_PROGRAM_INFO_LOG, GetProgramInfoLog, GetInfoLogARB, rc);
    488 
    489             VBOXVHWA_PFNINIT_ARB(context, PFNVBOXVHWA_GET_UNIFORM_LOCATION, GetUniformLocation, rc);
    490 
    491             VBOXVHWA_PFNINIT_ARB(context, PFNVBOXVHWA_UNIFORM1F, Uniform1f, rc);
    492             VBOXVHWA_PFNINIT_ARB(context, PFNVBOXVHWA_UNIFORM2F, Uniform2f, rc);
    493             VBOXVHWA_PFNINIT_ARB(context, PFNVBOXVHWA_UNIFORM3F, Uniform3f, rc);
    494             VBOXVHWA_PFNINIT_ARB(context, PFNVBOXVHWA_UNIFORM4F, Uniform4f, rc);
    495 
    496             VBOXVHWA_PFNINIT_ARB(context, PFNVBOXVHWA_UNIFORM1I, Uniform1i, rc);
    497             VBOXVHWA_PFNINIT_ARB(context, PFNVBOXVHWA_UNIFORM2I, Uniform2i, rc);
    498             VBOXVHWA_PFNINIT_ARB(context, PFNVBOXVHWA_UNIFORM3I, Uniform3i, rc);
    499             VBOXVHWA_PFNINIT_ARB(context, PFNVBOXVHWA_UNIFORM4I, Uniform4i, rc);
     468            VBOXVHWA_PFNINIT_OBJECT_ARB(context, PFNVBOXVHWA_CREATE_SHADER, CreateShader, vrc);
     469            VBOXVHWA_PFNINIT_ARB(context, PFNVBOXVHWA_SHADER_SOURCE, ShaderSource, vrc);
     470            VBOXVHWA_PFNINIT_ARB(context, PFNVBOXVHWA_COMPILE_SHADER, CompileShader, vrc);
     471            VBOXVHWA_PFNINIT(context, PFNVBOXVHWA_DELETE_SHADER, DeleteShader, DeleteObjectARB, vrc);
     472
     473            VBOXVHWA_PFNINIT_OBJECT_ARB(context, PFNVBOXVHWA_CREATE_PROGRAM, CreateProgram, vrc);
     474            VBOXVHWA_PFNINIT(context, PFNVBOXVHWA_ATTACH_SHADER, AttachShader, AttachObjectARB, vrc);
     475            VBOXVHWA_PFNINIT(context, PFNVBOXVHWA_DETACH_SHADER, DetachShader, DetachObjectARB, vrc);
     476            VBOXVHWA_PFNINIT_ARB(context, PFNVBOXVHWA_LINK_PROGRAM, LinkProgram, vrc);
     477            VBOXVHWA_PFNINIT_OBJECT_ARB(context, PFNVBOXVHWA_USE_PROGRAM, UseProgram, vrc);
     478            VBOXVHWA_PFNINIT(context, PFNVBOXVHWA_DELETE_PROGRAM, DeleteProgram, DeleteObjectARB, vrc);
     479
     480        /// @todo    VBOXVHWA_PFNINIT(PFNVBOXVHWA_IS_SHADER, IsShader, vrc);
     481            VBOXVHWA_PFNINIT(context, PFNVBOXVHWA_GET_SHADERIV, GetShaderiv, GetObjectParameterivARB, vrc);
     482        /// @todo    VBOXVHWA_PFNINIT(PFNVBOXVHWA_IS_PROGRAM, IsProgram, vrc);
     483            VBOXVHWA_PFNINIT(context, PFNVBOXVHWA_GET_PROGRAMIV, GetProgramiv, GetObjectParameterivARB, vrc);
     484            VBOXVHWA_PFNINIT(context, PFNVBOXVHWA_GET_ATTACHED_SHADERS, GetAttachedShaders, GetAttachedObjectsARB, vrc);
     485            VBOXVHWA_PFNINIT(context, PFNVBOXVHWA_GET_SHADER_INFO_LOG, GetShaderInfoLog, GetInfoLogARB, vrc);
     486            VBOXVHWA_PFNINIT(context, PFNVBOXVHWA_GET_PROGRAM_INFO_LOG, GetProgramInfoLog, GetInfoLogARB, vrc);
     487
     488            VBOXVHWA_PFNINIT_ARB(context, PFNVBOXVHWA_GET_UNIFORM_LOCATION, GetUniformLocation, vrc);
     489
     490            VBOXVHWA_PFNINIT_ARB(context, PFNVBOXVHWA_UNIFORM1F, Uniform1f, vrc);
     491            VBOXVHWA_PFNINIT_ARB(context, PFNVBOXVHWA_UNIFORM2F, Uniform2f, vrc);
     492            VBOXVHWA_PFNINIT_ARB(context, PFNVBOXVHWA_UNIFORM3F, Uniform3f, vrc);
     493            VBOXVHWA_PFNINIT_ARB(context, PFNVBOXVHWA_UNIFORM4F, Uniform4f, vrc);
     494
     495            VBOXVHWA_PFNINIT_ARB(context, PFNVBOXVHWA_UNIFORM1I, Uniform1i, vrc);
     496            VBOXVHWA_PFNINIT_ARB(context, PFNVBOXVHWA_UNIFORM2I, Uniform2i, vrc);
     497            VBOXVHWA_PFNINIT_ARB(context, PFNVBOXVHWA_UNIFORM3I, Uniform3i, vrc);
     498            VBOXVHWA_PFNINIT_ARB(context, PFNVBOXVHWA_UNIFORM4I, Uniform4i, vrc);
    500499        }
    501500        else
     
    504503        }
    505504
    506         if(RT_FAILURE(rc))
     505        if(RT_FAILURE(vrc))
    507506            break;
    508507
     
    512511    do
    513512    {
    514         rc = 0;
     513        vrc = 0;
    515514        mFBOSupported = false;
    516515
    517516        if(m_GL_EXT_framebuffer_object)
    518517        {
    519             VBOXVHWA_PFNINIT_EXT(context, PFNVBOXVHWA_IS_FRAMEBUFFER, IsFramebuffer, rc);
    520             VBOXVHWA_PFNINIT_EXT(context, PFNVBOXVHWA_BIND_FRAMEBUFFER, BindFramebuffer, rc);
    521             VBOXVHWA_PFNINIT_EXT(context, PFNVBOXVHWA_DELETE_FRAMEBUFFERS, DeleteFramebuffers, rc);
    522             VBOXVHWA_PFNINIT_EXT(context, PFNVBOXVHWA_GEN_FRAMEBUFFERS, GenFramebuffers, rc);
    523             VBOXVHWA_PFNINIT_EXT(context, PFNVBOXVHWA_CHECK_FRAMEBUFFER_STATUS, CheckFramebufferStatus, rc);
    524             VBOXVHWA_PFNINIT_EXT(context, PFNVBOXVHWA_FRAMEBUFFER_TEXTURE1D, FramebufferTexture1D, rc);
    525             VBOXVHWA_PFNINIT_EXT(context, PFNVBOXVHWA_FRAMEBUFFER_TEXTURE2D, FramebufferTexture2D, rc);
    526             VBOXVHWA_PFNINIT_EXT(context, PFNVBOXVHWA_FRAMEBUFFER_TEXTURE3D, FramebufferTexture3D, rc);
    527             VBOXVHWA_PFNINIT_EXT(context, PFNVBOXVHWA_GET_FRAMEBUFFER_ATTACHMENT_PARAMETRIV, GetFramebufferAttachmentParameteriv, rc);
     518            VBOXVHWA_PFNINIT_EXT(context, PFNVBOXVHWA_IS_FRAMEBUFFER, IsFramebuffer, vrc);
     519            VBOXVHWA_PFNINIT_EXT(context, PFNVBOXVHWA_BIND_FRAMEBUFFER, BindFramebuffer, vrc);
     520            VBOXVHWA_PFNINIT_EXT(context, PFNVBOXVHWA_DELETE_FRAMEBUFFERS, DeleteFramebuffers, vrc);
     521            VBOXVHWA_PFNINIT_EXT(context, PFNVBOXVHWA_GEN_FRAMEBUFFERS, GenFramebuffers, vrc);
     522            VBOXVHWA_PFNINIT_EXT(context, PFNVBOXVHWA_CHECK_FRAMEBUFFER_STATUS, CheckFramebufferStatus, vrc);
     523            VBOXVHWA_PFNINIT_EXT(context, PFNVBOXVHWA_FRAMEBUFFER_TEXTURE1D, FramebufferTexture1D, vrc);
     524            VBOXVHWA_PFNINIT_EXT(context, PFNVBOXVHWA_FRAMEBUFFER_TEXTURE2D, FramebufferTexture2D, vrc);
     525            VBOXVHWA_PFNINIT_EXT(context, PFNVBOXVHWA_FRAMEBUFFER_TEXTURE3D, FramebufferTexture3D, vrc);
     526            VBOXVHWA_PFNINIT_EXT(context, PFNVBOXVHWA_GET_FRAMEBUFFER_ATTACHMENT_PARAMETRIV, GetFramebufferAttachmentParameteriv, vrc);
    528527        }
    529528        else
     
    532531        }
    533532
    534         if(RT_FAILURE(rc))
     533        if(RT_FAILURE(vrc))
    535534            break;
    536535
     
    625624    static char pszVBoxPath[RTPATH_MAX];
    626625    const char *papszArgs[] = { NULL, "-test", "2D", NULL};
    627     int rc;
     626
     627    int vrc = RTPathExecDir(pszVBoxPath, RTPATH_MAX); AssertRCReturn(vrc, false);
     628# if defined(RT_OS_WINDOWS) || defined(RT_OS_OS2)
     629    vrc = RTPathAppend(pszVBoxPath, RTPATH_MAX, "VBoxTestOGL.exe");
     630# else
     631    vrc = RTPathAppend(pszVBoxPath, RTPATH_MAX, "VBoxTestOGL");
     632# endif
     633    papszArgs[0] = pszVBoxPath;         /* argv[0] */
     634    AssertRCReturn(vrc, false);
     635
    628636    RTPROCESS Process;
    629     RTPROCSTATUS ProcStatus;
    630     uint64_t StartTS;
    631 
    632     rc = RTPathExecDir(pszVBoxPath, RTPATH_MAX); AssertRCReturn(rc, false);
    633 #if defined(RT_OS_WINDOWS) || defined(RT_OS_OS2)
    634     rc = RTPathAppend(pszVBoxPath, RTPATH_MAX, "VBoxTestOGL.exe");
    635 #else
    636     rc = RTPathAppend(pszVBoxPath, RTPATH_MAX, "VBoxTestOGL");
    637 #endif
    638     papszArgs[0] = pszVBoxPath;         /* argv[0] */
    639     AssertRCReturn(rc, false);
    640 
    641     rc = RTProcCreate(pszVBoxPath, papszArgs, RTENV_DEFAULT, 0, &Process);
    642     if (RT_FAILURE(rc))
     637    vrc = RTProcCreate(pszVBoxPath, papszArgs, RTENV_DEFAULT, 0, &Process);
     638    if (RT_FAILURE(vrc))
    643639    {
    644640        VBOXQGLLOGREL(("2D support test failed: failed to create a test process\n"));
     
    646642    }
    647643
    648     StartTS = RTTimeMilliTS();
    649 
     644    uint64_t const StartTS = RTTimeMilliTS();
     645
     646    RTPROCSTATUS ProcStatus = {0};
    650647    while (1)
    651648    {
    652         rc = RTProcWait(Process, RTPROCWAIT_FLAGS_NOBLOCK, &ProcStatus);
    653         if (rc != VERR_PROCESS_RUNNING)
     649        vrc = RTProcWait(Process, RTPROCWAIT_FLAGS_NOBLOCK, &ProcStatus);
     650        if (vrc != VERR_PROCESS_RUNNING)
    654651            break;
    655652
     
    665662    }
    666663
    667     if (RT_SUCCESS(rc))
     664    if (RT_SUCCESS(vrc))
    668665    {
    669666        if ((ProcStatus.enmReason==RTPROCEXITREASON_NORMAL) && (ProcStatus.iStatus==0))
     
    674671    }
    675672
    676     VBOXQGLLOGREL(("2D support test failed: err code (%Rra)\n", rc));
     673    VBOXQGLLOGREL(("2D support test failed: err code (%Rra)\n", vrc));
    677674
    678675    return false;
  • trunk/src/VBox/Main/src-helper-apps/VBoxExtPackHelperApp.cpp

    r98103 r98281  
    173173     */
    174174    char szCorrect[RTPATH_MAX];
    175     int rc = RTPathAppPrivateNoArch(szCorrect, sizeof(szCorrect));
    176     if (RT_FAILURE(rc))
     175    int vrc = RTPathAppPrivateNoArch(szCorrect, sizeof(szCorrect));
     176    if (RT_FAILURE(vrc))
    177177        return false;
    178     rc = RTPathAppend(szCorrect, sizeof(szCorrect), VBOX_EXTPACK_CERT_DIR);
    179     if (RT_FAILURE(rc))
     178    vrc = RTPathAppend(szCorrect, sizeof(szCorrect), VBOX_EXTPACK_CERT_DIR);
     179    if (RT_FAILURE(vrc))
    180180        return false;
    181181
     
    196196     */
    197197    char szCorrect[RTPATH_MAX];
    198     int rc = RTPathAppPrivateArchTop(szCorrect, sizeof(szCorrect));
    199     if (RT_FAILURE(rc))
     198    int vrc = RTPathAppPrivateArchTop(szCorrect, sizeof(szCorrect));
     199    if (RT_FAILURE(vrc))
    200200        return false;
    201     rc = RTPathAppend(szCorrect, sizeof(szCorrect), VBOX_EXTPACK_INSTALL_DIR);
    202     if (RT_FAILURE(rc))
     201    vrc = RTPathAppend(szCorrect, sizeof(szCorrect), VBOX_EXTPACK_INSTALL_DIR);
     202    if (RT_FAILURE(vrc))
    203203        return false;
    204204
     
    221221{
    222222    /** @todo May have to undo 555 modes here later.  */
    223     int rc = RTDirRemoveRecursive(pszDir, RTDIRRMREC_F_CONTENT_AND_DIR);
    224     if (RT_FAILURE(rc))
     223    int vrc = RTDirRemoveRecursive(pszDir, RTDIRRMREC_F_CONTENT_AND_DIR);
     224    if (RT_FAILURE(vrc))
    225225        return RTMsgErrorExit(RTEXITCODE_FAILURE,
    226226                              "Failed to delete the %sextension pack directory: %Rrc ('%s')",
    227                               fTemporary ? "temporary " : "", rc, pszDir);
     227                              fTemporary ? "temporary " : "", vrc, pszDir);
    228228    return RTEXITCODE_SUCCESS;
    229229}
     
    240240    for (;;)
    241241    {
    242         int rc = RTDirRename(pszSrc, pszDst, fFlags);
    243         if (   (   rc != VERR_ACCESS_DENIED
    244                 && rc != VERR_SHARING_VIOLATION)
     242        int vrc = RTDirRename(pszSrc, pszDst, fFlags);
     243        if (   (   vrc != VERR_ACCESS_DENIED
     244                && vrc != VERR_SHARING_VIOLATION)
    245245            || RTTimeNanoTS() - nsNow > RT_NS_15SEC)
    246             return rc;
     246            return vrc;
    247247        RTThreadSleep(128);
    248248    }
     
    263263       VM processes from picking it up. */
    264264    char szExtPackUnInstDir[RTPATH_MAX];
    265     int rc = RTStrCopy(szExtPackUnInstDir, sizeof(szExtPackUnInstDir), pszExtPackDir);
    266     if (RT_SUCCESS(rc))
    267         rc = RTStrCat(szExtPackUnInstDir, sizeof(szExtPackUnInstDir), "-_-uninst");
    268     if (RT_FAILURE(rc))
    269         return RTMsgErrorExit(RTEXITCODE_FAILURE, "Failed to construct temporary extension pack path: %Rrc", rc);
    270 
    271     rc = CommonDirRenameWrapper(pszExtPackDir, szExtPackUnInstDir, RTPATHRENAME_FLAGS_NO_REPLACE);
    272     if (rc == VERR_ALREADY_EXISTS)
     265    int vrc = RTStrCopy(szExtPackUnInstDir, sizeof(szExtPackUnInstDir), pszExtPackDir);
     266    if (RT_SUCCESS(vrc))
     267        vrc = RTStrCat(szExtPackUnInstDir, sizeof(szExtPackUnInstDir), "-_-uninst");
     268    if (RT_FAILURE(vrc))
     269        return RTMsgErrorExit(RTEXITCODE_FAILURE, "Failed to construct temporary extension pack path: %Rrc", vrc);
     270
     271    vrc = CommonDirRenameWrapper(pszExtPackDir, szExtPackUnInstDir, RTPATHRENAME_FLAGS_NO_REPLACE);
     272    if (vrc == VERR_ALREADY_EXISTS)
    273273    {
    274274        /* Automatic cleanup and try again.  It's in theory possible that we're
     
    277277           installation directory.) */
    278278        RemoveExtPackDir(szExtPackUnInstDir, false /*fTemporary*/);
    279         rc = CommonDirRenameWrapper(pszExtPackDir, szExtPackUnInstDir, RTPATHRENAME_FLAGS_NO_REPLACE);
    280     }
    281     if (RT_FAILURE(rc))
     279        vrc = CommonDirRenameWrapper(pszExtPackDir, szExtPackUnInstDir, RTPATHRENAME_FLAGS_NO_REPLACE);
     280    }
     281    if (RT_FAILURE(vrc))
    282282        return RTMsgErrorExit(RTEXITCODE_FAILURE,
    283283                              "Failed to rename the extension pack directory: %Rrc\n"
    284                               "If the problem persists, try running the command: VBoxManage extpack cleanup", rc);
     284                              "If the problem persists, try running the command: VBoxManage extpack cleanup", vrc);
    285285
    286286    /* Recursively delete the directory content. */
     
    299299{
    300300    char szError[8192];
    301     int rc = VBoxExtPackOpenTarFss(hTarballFile, szError, sizeof(szError), phTarFss, NULL);
    302     if (RT_FAILURE(rc))
     301    int vrc = VBoxExtPackOpenTarFss(hTarballFile, szError, sizeof(szError), phTarFss, NULL);
     302    if (RT_FAILURE(vrc))
    303303    {
    304304        Assert(szError[0]);
     
    324324    RTMsgInfo("Setting permissions...");
    325325#if !defined(RT_OS_WINDOWS)
    326      int rc = RTPathSetMode(pszDir, 0755);
    327      if (RT_FAILURE(rc))
    328          return RTMsgErrorExit(RTEXITCODE_FAILURE, "Failed to set directory permissions: %Rrc ('%s')", rc, pszDir);
     326     int vrc = RTPathSetMode(pszDir, 0755);
     327     if (RT_FAILURE(vrc))
     328         return RTMsgErrorExit(RTEXITCODE_FAILURE, "Failed to set directory permissions: %Rrc ('%s')", vrc, pszDir);
    329329#else
    330330     /** @todo TrustedInstaller? */
     
    347347{
    348348    char szError[8192];
    349     int rc = VBoxExtPackValidateMember(pszName, enmType, hVfsObj, szError, sizeof(szError));
    350     if (RT_FAILURE(rc))
     349    int vrc = VBoxExtPackValidateMember(pszName, enmType, hVfsObj, szError, sizeof(szError));
     350    if (RT_FAILURE(vrc))
    351351    {
    352352        Assert(szError[0]);
     
    378378    RTERRINFOSTATIC ErrInfo;
    379379    RTErrInfoInitStatic(&ErrInfo);
    380     int rc = SUPR3HardenedVerifyDir(pszDir, true /*fRecursive*/, true /*fCheckFiles*/, &ErrInfo.Core);
    381     if (RT_FAILURE(rc))
    382         return RTMsgErrorExit(RTEXITCODE_FAILURE, "Hardening check failed with %Rrc: %s", rc, ErrInfo.Core.pszMsg);
     380    int vrc = SUPR3HardenedVerifyDir(pszDir, true /*fRecursive*/, true /*fCheckFiles*/, &ErrInfo.Core);
     381    if (RT_FAILURE(vrc))
     382        return RTMsgErrorExit(RTEXITCODE_FAILURE, "Hardening check failed with %Rrc: %s", vrc, ErrInfo.Core.pszMsg);
    383383    return RTEXITCODE_SUCCESS;
    384384}
     
    398398     */
    399399    RTFSOBJINFO ObjInfo;
    400     int rc = RTVfsObjQueryInfo(hVfsObj, &ObjInfo, RTFSOBJATTRADD_NOTHING);
    401     if (RT_FAILURE(rc))
    402         return RTMsgErrorExit(RTEXITCODE_FAILURE, "RTVfsObjQueryInfo failed on '%s': %Rrc", pszDstDirName, rc);
     400    int vrc = RTVfsObjQueryInfo(hVfsObj, &ObjInfo, RTFSOBJATTRADD_NOTHING);
     401    if (RT_FAILURE(vrc))
     402        return RTMsgErrorExit(RTEXITCODE_FAILURE, "RTVfsObjQueryInfo failed on '%s': %Rrc", pszDstDirName, vrc);
    403403    ObjInfo.Attr.fMode &= ~(RTFS_UNIX_IWOTH | RTFS_UNIX_IWGRP);
    404404
    405     rc = RTDirCreate(pszDstDirName, ObjInfo.Attr.fMode, 0);
    406     if (RT_FAILURE(rc))
    407         return RTMsgErrorExit(RTEXITCODE_FAILURE, "Failed to create directory '%s': %Rrc", pszDstDirName, rc);
     405    vrc = RTDirCreate(pszDstDirName, ObjInfo.Attr.fMode, 0);
     406    if (RT_FAILURE(vrc))
     407        return RTMsgErrorExit(RTEXITCODE_FAILURE, "Failed to create directory '%s': %Rrc", pszDstDirName, vrc);
    408408
    409409#ifndef RT_OS_WINDOWS
     
    411411     * Because of umask, we have to apply the mode again.
    412412     */
    413     rc = RTPathSetMode(pszDstDirName, ObjInfo.Attr.fMode);
    414     if (RT_FAILURE(rc))
    415         return RTMsgErrorExit(RTEXITCODE_FAILURE, "Failed to set directory permissions on '%s': %Rrc", pszDstDirName, rc);
     413    vrc = RTPathSetMode(pszDstDirName, ObjInfo.Attr.fMode);
     414    if (RT_FAILURE(vrc))
     415        return RTMsgErrorExit(RTEXITCODE_FAILURE, "Failed to set directory permissions on '%s': %Rrc", pszDstDirName, vrc);
    416416#else
    417417    /** @todo Ownership tricks on windows? */
     
    438438     */
    439439    RTFSOBJINFO ObjInfo;
    440     int rc = RTVfsIoStrmQueryInfo(hVfsIosSrc, &ObjInfo, RTFSOBJATTRADD_NOTHING);
    441     if (RT_FAILURE(rc))
    442         return RTMsgErrorExit(RTEXITCODE_FAILURE, "RTVfsIoStrmQueryInfo failed with %Rrc on '%s'", rc, pszDstFilename);
     440    int vrc = RTVfsIoStrmQueryInfo(hVfsIosSrc, &ObjInfo, RTFSOBJATTRADD_NOTHING);
     441    if (RT_FAILURE(vrc))
     442        return RTMsgErrorExit(RTEXITCODE_FAILURE, "RTVfsIoStrmQueryInfo failed with %Rrc on '%s'", vrc, pszDstFilename);
    443443
    444444    /*
     
    447447    uint32_t fFlags = RTFILE_O_WRITE | RTFILE_O_DENY_ALL | RTFILE_O_CREATE | (0600 << RTFILE_O_CREATE_MODE_SHIFT);
    448448    RTFILE   hFile;
    449     rc = RTFileOpen(&hFile, pszDstFilename, fFlags);
    450     if (RT_FAILURE(rc))
    451         return RTMsgErrorExit(RTEXITCODE_FAILURE, "Failed to create '%s': %Rrc", pszDstFilename, rc);
     449    vrc = RTFileOpen(&hFile, pszDstFilename, fFlags);
     450    if (RT_FAILURE(vrc))
     451        return RTMsgErrorExit(RTEXITCODE_FAILURE, "Failed to create '%s': %Rrc", pszDstFilename, vrc);
    452452
    453453    /*
     
    456456     */
    457457    RTVFSIOSTREAM hVfsIosDst2;
    458     rc = RTVfsIoStrmFromRTFile(hFile, fFlags, true /*fLeaveOpen*/, &hVfsIosDst2);
    459     if (RT_SUCCESS(rc))
     458    vrc = RTVfsIoStrmFromRTFile(hFile, fFlags, true /*fLeaveOpen*/, &hVfsIosDst2);
     459    if (RT_SUCCESS(vrc))
    460460    {
    461461        RTVFSIOSTREAM hVfsIosDst;
    462         rc = RTManifestEntryAddPassthruIoStream(hUnpackManifest, hVfsIosDst2, pszName,
    463                                                 RTMANIFEST_ATTR_SIZE | RTMANIFEST_ATTR_SHA256,
    464                                                 false /*fReadOrWrite*/, &hVfsIosDst);
     462        vrc = RTManifestEntryAddPassthruIoStream(hUnpackManifest, hVfsIosDst2, pszName,
     463                                                 RTMANIFEST_ATTR_SIZE | RTMANIFEST_ATTR_SHA256,
     464                                                 false /*fReadOrWrite*/, &hVfsIosDst);
    465465        RTVfsIoStrmRelease(hVfsIosDst2);
    466         if (RT_SUCCESS(rc))
     466        if (RT_SUCCESS(vrc))
    467467        {
    468468            /*
    469469             * Pump the data thru.
    470470             */
    471             rc = RTVfsUtilPumpIoStreams(hVfsIosSrc, hVfsIosDst, (uint32_t)RT_MIN(ObjInfo.cbObject, _1G));
    472             if (RT_SUCCESS(rc))
     471            vrc = RTVfsUtilPumpIoStreams(hVfsIosSrc, hVfsIosDst, (uint32_t)RT_MIN(ObjInfo.cbObject, _1G));
     472            if (RT_SUCCESS(vrc))
    473473            {
    474                 rc = RTManifestPtIosAddEntryNow(hVfsIosDst);
    475                 if (RT_SUCCESS(rc))
     474                vrc = RTManifestPtIosAddEntryNow(hVfsIosDst);
     475                if (RT_SUCCESS(vrc))
    476476                {
    477477                    RTVfsIoStrmRelease(hVfsIosDst);
     
    482482                     */
    483483                    ObjInfo.Attr.fMode &= ~(RTFS_UNIX_IWOTH | RTFS_UNIX_IWGRP);
    484                     rc = RTFileSetMode(hFile, ObjInfo.Attr.fMode);
     484                    vrc = RTFileSetMode(hFile, ObjInfo.Attr.fMode);
    485485                    /** @todo Windows needs to do more here, I think. */
    486                     if (RT_SUCCESS(rc))
     486                    if (RT_SUCCESS(vrc))
    487487                    {
    488488                        RTFileClose(hFile);
     
    490490                    }
    491491
    492                     RTMsgError("Failed to set the mode of '%s' to %RTfmode: %Rrc", pszDstFilename, ObjInfo.Attr.fMode, rc);
     492                    RTMsgError("Failed to set the mode of '%s' to %RTfmode: %Rrc", pszDstFilename, ObjInfo.Attr.fMode, vrc);
    493493                }
    494494                else
    495                     RTMsgError("RTManifestPtIosAddEntryNow failed for '%s': %Rrc", pszDstFilename, rc);
     495                    RTMsgError("RTManifestPtIosAddEntryNow failed for '%s': %Rrc", pszDstFilename, vrc);
    496496            }
    497497            else
    498                 RTMsgError("RTVfsUtilPumpIoStreams failed for '%s': %Rrc", pszDstFilename, rc);
     498                RTMsgError("RTVfsUtilPumpIoStreams failed for '%s': %Rrc", pszDstFilename, vrc);
    499499            RTVfsIoStrmRelease(hVfsIosDst);
    500500        }
    501501        else
    502             RTMsgError("RTManifestEntryAddPassthruIoStream failed: %Rrc", rc);
     502            RTMsgError("RTManifestEntryAddPassthruIoStream failed: %Rrc", vrc);
    503503    }
    504504    else
    505         RTMsgError("RTVfsIoStrmFromRTFile failed: %Rrc", rc);
     505        RTMsgError("RTVfsIoStrmFromRTFile failed: %Rrc", vrc);
    506506    RTFileClose(hFile);
    507507    return RTEXITCODE_FAILURE;
     
    532532     */
    533533    char szDstPath[RTPATH_MAX];
    534     int rc = RTPathAbs(pszDirDst, szDstPath, sizeof(szDstPath) - VBOX_EXTPACK_MAX_MEMBER_NAME_LENGTH - 2);
    535     if (RT_FAILURE(rc))
    536         return RTMsgErrorExit(RTEXITCODE_FAILURE, "RTPathAbs('%s',,) failed: %Rrc", pszDirDst, rc);
     534    int vrc = RTPathAbs(pszDirDst, szDstPath, sizeof(szDstPath) - VBOX_EXTPACK_MAX_MEMBER_NAME_LENGTH - 2);
     535    if (RT_FAILURE(vrc))
     536        return RTMsgErrorExit(RTEXITCODE_FAILURE, "RTPathAbs('%s',,) failed: %Rrc", pszDirDst, vrc);
    537537    size_t offDstPath = RTPathStripTrailingSlash(szDstPath);
    538538    szDstPath[offDstPath++] = '/';
     
    548548
    549549    RTMANIFEST hUnpackManifest;
    550     rc = RTManifestCreate(0 /*fFlags*/, &hUnpackManifest);
    551     if (RT_SUCCESS(rc))
     550    vrc = RTManifestCreate(0 /*fFlags*/, &hUnpackManifest);
     551    if (RT_SUCCESS(vrc))
    552552    {
    553553        /*
     
    562562            RTVFSOBJ        hVfsObj;
    563563            RTVFSOBJTYPE    enmType;
    564             rc = RTVfsFsStrmNext(hTarFss, &pszName, &enmType, &hVfsObj);
    565             if (RT_FAILURE(rc))
     564            vrc = RTVfsFsStrmNext(hTarFss, &pszName, &enmType, &hVfsObj);
     565            if (RT_FAILURE(vrc))
    566566            {
    567                 if (rc != VERR_EOF)
    568                     rcExit = RTMsgErrorExit(RTEXITCODE_FAILURE, "RTVfsFsStrmNext failed: %Rrc", rc);
     567                if (vrc != VERR_EOF)
     568                    rcExit = RTMsgErrorExit(RTEXITCODE_FAILURE, "RTVfsFsStrmNext failed: %Rrc", vrc);
    569569                break;
    570570            }
     
    578578            {
    579579                szDstPath[offDstPath] = '\0';
    580                 rc = RTStrCopy(&szDstPath[offDstPath], sizeof(szDstPath) - offDstPath, pszAdjName);
    581                 if (RT_SUCCESS(rc))
     580                vrc = RTStrCopy(&szDstPath[offDstPath], sizeof(szDstPath) - offDstPath, pszAdjName);
     581                if (RT_SUCCESS(vrc))
    582582                {
    583583                    if (   enmType == RTVFSOBJTYPE_FILE
     
    592592                }
    593593                else
    594                     rcExit = RTMsgErrorExit(RTEXITCODE_FAILURE, "Name is too long: '%s' (%Rrc)", pszAdjName, rc);
     594                    rcExit = RTMsgErrorExit(RTEXITCODE_FAILURE, "Name is too long: '%s' (%Rrc)", pszAdjName, vrc);
    595595            }
    596596
     
    611611        {
    612612            char szError[RTPATH_MAX];
    613             rc = RTManifestEqualsEx(hUnpackManifest, hValidManifest, NULL /*papszIgnoreEntries*/, NULL /*papszIgnoreAttr*/,
    614                                     0 /*fFlags*/, szError, sizeof(szError));
    615             if (RT_SUCCESS(rc))
     613            vrc = RTManifestEqualsEx(hUnpackManifest, hValidManifest, NULL /*papszIgnoreEntries*/, NULL /*papszIgnoreAttr*/,
     614                                     0 /*fFlags*/, szError, sizeof(szError));
     615            if (RT_SUCCESS(vrc))
    616616                rcExit = RTEXITCODE_SUCCESS;
    617             else if (rc == VERR_NOT_EQUAL && szError[0])
     617            else if (vrc == VERR_NOT_EQUAL && szError[0])
    618618                rcExit = RTMsgErrorExit(RTEXITCODE_FAILURE, "Manifest mismatch: %s", szError);
    619619            else
    620                 rcExit = RTMsgErrorExit(RTEXITCODE_FAILURE, "RTManifestEqualsEx failed: %Rrc", rc);
     620                rcExit = RTMsgErrorExit(RTEXITCODE_FAILURE, "RTManifestEqualsEx failed: %Rrc", vrc);
    621621        }
    622622#if 0
     
    658658
    659659    char szError[8192];
    660     int rc = VBoxExtPackValidateTarball(hTarballFile, pszExtPackName, pszTarball, pszTarballDigest,
    661                                         szError, sizeof(szError), phValidManifest, NULL /*phXmlFile*/, NULL /*pStrDigest*/);
    662     if (RT_FAILURE(rc))
     660    int vrc = VBoxExtPackValidateTarball(hTarballFile, pszExtPackName, pszTarball, pszTarballDigest,
     661                                         szError, sizeof(szError), phValidManifest, NULL /*phXmlFile*/, NULL /*pStrDigest*/);
     662    if (RT_FAILURE(vrc))
    663663    {
    664664        Assert(szError[0]);
     
    695695     */
    696696    RTFSOBJINFO ObjInfo;
    697     int rc = RTFileQueryInfo(hTarballFile, &ObjInfo, RTFSOBJATTRADD_UNIX);
    698     if (RT_FAILURE(rc))
    699         return RTMsgErrorExit(RTEXITCODE_FAILURE, "RTFileQueryInfo failed with %Rrc on '%s'", rc, pszTarball);
     697    int vrc = RTFileQueryInfo(hTarballFile, &ObjInfo, RTFSOBJATTRADD_UNIX);
     698    if (RT_FAILURE(vrc))
     699        return RTMsgErrorExit(RTEXITCODE_FAILURE, "RTFileQueryInfo failed with %Rrc on '%s'", vrc, pszTarball);
    700700    if (!RTFS_IS_FILE(ObjInfo.Attr.fMode))
    701701        return RTMsgErrorExit(RTEXITCODE_FAILURE, "Not a regular file: %s", pszTarball);
     
    704704    {
    705705        RTFSOBJINFO ObjInfo2;
    706         rc = RTFileQueryInfo(hTarballFileOpt, &ObjInfo2, RTFSOBJATTRADD_UNIX);
    707         if (RT_FAILURE(rc))
    708             return RTMsgErrorExit(RTEXITCODE_FAILURE, "RTFileQueryInfo failed with %Rrc on --tarball-fd", rc);
     706        vrc = RTFileQueryInfo(hTarballFileOpt, &ObjInfo2, RTFSOBJATTRADD_UNIX);
     707        if (RT_FAILURE(vrc))
     708            return RTMsgErrorExit(RTEXITCODE_FAILURE, "RTFileQueryInfo failed with %Rrc on --tarball-fd", vrc);
    709709        if (   ObjInfo.Attr.u.Unix.INodeIdDevice != ObjInfo2.Attr.u.Unix.INodeIdDevice
    710710            || ObjInfo.Attr.u.Unix.INodeId       != ObjInfo2.Attr.u.Unix.INodeId)
     
    716716     */
    717717    char szFinalPath[RTPATH_MAX];
    718     rc = RTPathJoin(szFinalPath, sizeof(szFinalPath), pszBaseDir, pszMangledName);
    719     if (RT_FAILURE(rc))
     718    vrc = RTPathJoin(szFinalPath, sizeof(szFinalPath), pszBaseDir, pszMangledName);
     719    if (RT_FAILURE(vrc))
    720720        return RTMsgErrorExit(RTEXITCODE_FAILURE,
    721                               "Failed to construct the path to the final extension pack directory: %Rrc", rc);
     721                              "Failed to construct the path to the final extension pack directory: %Rrc", vrc);
    722722
    723723    char szTmpPath[RTPATH_MAX];
    724     rc = RTPathJoin(szTmpPath, sizeof(szTmpPath) - 64, pszBaseDir, pszMangledName);
    725     if (RT_SUCCESS(rc))
     724    vrc = RTPathJoin(szTmpPath, sizeof(szTmpPath) - 64, pszBaseDir, pszMangledName);
     725    if (RT_SUCCESS(vrc))
    726726    {
    727727        size_t cchTmpPath = strlen(szTmpPath);
    728728        RTStrPrintf(&szTmpPath[cchTmpPath], sizeof(szTmpPath) - cchTmpPath, "-_-inst-%u", (uint32_t)RTProcSelf());
    729729    }
    730     if (RT_FAILURE(rc))
     730    if (RT_FAILURE(vrc))
    731731        return RTMsgErrorExit(RTEXITCODE_FAILURE,
    732                               "Failed to construct the path to the temporary extension pack directory: %Rrc", rc);
     732                              "Failed to construct the path to the temporary extension pack directory: %Rrc", vrc);
    733733
    734734    /*
    735735     * Check that they don't exist at this point in time, unless fReplace=true.
    736736     */
    737     rc = RTPathQueryInfoEx(szFinalPath, &ObjInfo, RTFSOBJATTRADD_NOTHING, RTPATH_F_ON_LINK);
    738     if (RT_SUCCESS(rc) && RTFS_IS_DIRECTORY(ObjInfo.Attr.fMode))
     737    vrc = RTPathQueryInfoEx(szFinalPath, &ObjInfo, RTFSOBJATTRADD_NOTHING, RTPATH_F_ON_LINK);
     738    if (RT_SUCCESS(vrc) && RTFS_IS_DIRECTORY(ObjInfo.Attr.fMode))
    739739    {
    740740        if (!fReplace)
     
    742742                                  "The extension pack is already installed. You must uninstall the old one first.");
    743743    }
    744     else if (RT_SUCCESS(rc))
     744    else if (RT_SUCCESS(vrc))
    745745        return RTMsgErrorExit(RTEXITCODE_FAILURE,
    746746                              "Found non-directory file system object where the extension pack would be installed ('%s')",
    747747                              szFinalPath);
    748     else if (rc != VERR_FILE_NOT_FOUND && rc != VERR_PATH_NOT_FOUND)
    749         return RTMsgErrorExit(RTEXITCODE_FAILURE, "Unexpected RTPathQueryInfoEx status code %Rrc for '%s'", rc, szFinalPath);
    750 
    751     rc = RTPathQueryInfoEx(szTmpPath, &ObjInfo, RTFSOBJATTRADD_NOTHING, RTPATH_F_ON_LINK);
    752     if (rc != VERR_FILE_NOT_FOUND && rc != VERR_PATH_NOT_FOUND)
    753         return RTMsgErrorExit(RTEXITCODE_FAILURE, "Unexpected RTPathQueryInfoEx status code %Rrc for '%s'", rc, szFinalPath);
     748    else if (vrc != VERR_FILE_NOT_FOUND && vrc != VERR_PATH_NOT_FOUND)
     749        return RTMsgErrorExit(RTEXITCODE_FAILURE, "Unexpected RTPathQueryInfoEx status code %Rrc for '%s'", vrc, szFinalPath);
     750
     751    vrc = RTPathQueryInfoEx(szTmpPath, &ObjInfo, RTFSOBJATTRADD_NOTHING, RTPATH_F_ON_LINK);
     752    if (vrc != VERR_FILE_NOT_FOUND && vrc != VERR_PATH_NOT_FOUND)
     753        return RTMsgErrorExit(RTEXITCODE_FAILURE, "Unexpected RTPathQueryInfoEx status code %Rrc for '%s'", vrc, szFinalPath);
    754754
    755755    /*
     
    762762     * Because of umask, we have to apply the mode again.
    763763     */
    764     rc = RTPathSetMode(pszBaseDir, 0755);
    765     if (RT_FAILURE(rc))
    766         return RTMsgErrorExit(RTEXITCODE_FAILURE, "Failed to set directory permissions on '%s': %Rrc", pszBaseDir, rc);
     764    vrc = RTPathSetMode(pszBaseDir, 0755);
     765    if (RT_FAILURE(vrc))
     766        return RTMsgErrorExit(RTEXITCODE_FAILURE, "Failed to set directory permissions on '%s': %Rrc", pszBaseDir, vrc);
    767767#else
    768768    /** @todo Ownership tricks on windows? */
    769769#endif
    770     rc = RTDirCreate(szTmpPath, 0700, 0);
    771     if (RT_FAILURE(rc))
    772         return RTMsgErrorExit(RTEXITCODE_FAILURE, "Failed to create temporary directory: %Rrc ('%s')", rc, szTmpPath);
     770    vrc = RTDirCreate(szTmpPath, 0700, 0);
     771    if (RT_FAILURE(vrc))
     772        return RTMsgErrorExit(RTEXITCODE_FAILURE, "Failed to create temporary directory: %Rrc ('%s')", vrc, szTmpPath);
    773773
    774774    RTMANIFEST hValidManifest = NIL_RTMANIFEST;
     
    784784    if (rcExit == RTEXITCODE_SUCCESS)
    785785    {
    786         rc = CommonDirRenameWrapper(szTmpPath, szFinalPath, RTPATHRENAME_FLAGS_NO_REPLACE);
    787         if (   RT_FAILURE(rc)
     786        vrc = CommonDirRenameWrapper(szTmpPath, szFinalPath, RTPATHRENAME_FLAGS_NO_REPLACE);
     787        if (   RT_FAILURE(vrc)
    788788            && fReplace
    789789            && RTDirExists(szFinalPath))
     
    792792            rcExit = CommonUninstallWorker(szFinalPath);
    793793            if (rcExit == RTEXITCODE_SUCCESS)
    794                 rc = CommonDirRenameWrapper(szTmpPath, szFinalPath, RTPATHRENAME_FLAGS_NO_REPLACE);
     794                vrc = CommonDirRenameWrapper(szTmpPath, szFinalPath, RTPATHRENAME_FLAGS_NO_REPLACE);
    795795        }
    796         if (RT_SUCCESS(rc))
     796        if (RT_SUCCESS(vrc))
    797797            RTMsgInfo("Successfully installed '%s' (%s)", pszName, pszTarball);
    798798        else if (rcExit == RTEXITCODE_SUCCESS)
    799799            rcExit = RTMsgErrorExit(RTEXITCODE_FAILURE,
    800800                                    "Failed to rename the temporary directory to the final one: %Rrc ('%s' -> '%s')",
    801                                     rc, szTmpPath, szFinalPath);
     801                                    vrc, szTmpPath, szFinalPath);
    802802    }
    803803
     
    841841    };
    842842    RTGETOPTSTATE   GetState;
    843     int rc = RTGetOptInit(&GetState, argc, argv, s_aOptions, RT_ELEMENTS(s_aOptions), 0, 0 /*fFlags*/);
    844     if (RT_FAILURE(rc))
    845         return RTMsgErrorExit(RTEXITCODE_FAILURE, "RTGetOptInit failed: %Rrc\n", rc);
     843    int vrc = RTGetOptInit(&GetState, argc, argv, s_aOptions, RT_ELEMENTS(s_aOptions), 0, 0 /*fFlags*/);
     844    if (RT_FAILURE(vrc))
     845        return RTMsgErrorExit(RTEXITCODE_FAILURE, "RTGetOptInit failed: %Rrc\n", vrc);
    846846
    847847    const char     *pszBaseDir          = NULL;
     
    895895                if (hNative != ValueUnion.u64)
    896896                    return RTMsgErrorExit(RTEXITCODE_SYNTAX, "The --tarball-fd value is out of range: %#RX64", ValueUnion.u64);
    897                 rc = RTFileFromNative(&hTarballFileOpt, hNative);
    898                 if (RT_FAILURE(rc))
    899                     return RTMsgErrorExit(RTEXITCODE_SYNTAX, "RTFileFromNative failed on --target-fd value: %Rrc", rc);
     897                vrc = RTFileFromNative(&hTarballFileOpt, hNative);
     898                if (RT_FAILURE(vrc))
     899                    return RTMsgErrorExit(RTEXITCODE_SYNTAX, "RTFileFromNative failed on --target-fd value: %Rrc", vrc);
    900900                break;
    901901            }
     
    912912
    913913                uint8_t abDigest[RTSHA256_HASH_SIZE];
    914                 rc = RTSha256FromString(pszTarballDigest, abDigest);
    915                 if (RT_FAILURE(rc))
    916                     return RTMsgErrorExit(RTEXITCODE_SYNTAX, "Bad SHA-256 string: %Rrc", rc);
     914                vrc = RTSha256FromString(pszTarballDigest, abDigest);
     915                if (RT_FAILURE(vrc))
     916                    return RTMsgErrorExit(RTEXITCODE_SYNTAX, "Bad SHA-256 string: %Rrc", vrc);
    917917                break;
    918918            }
     
    946946    RTEXITCODE  rcExit;
    947947    RTFILE      hTarballFile;
    948     rc = RTFileOpen(&hTarballFile, pszTarball, RTFILE_O_READ | RTFILE_O_OPEN | RTFILE_O_DENY_WRITE);
    949     if (RT_SUCCESS(rc))
     948    vrc = RTFileOpen(&hTarballFile, pszTarball, RTFILE_O_READ | RTFILE_O_OPEN | RTFILE_O_DENY_WRITE);
     949    if (RT_SUCCESS(vrc))
    950950    {
    951951        rcExit = DoInstall2(pszBaseDir, pszCertDir, pszTarball, pszTarballDigest, hTarballFile, hTarballFileOpt,
     
    954954    }
    955955    else
    956         rcExit = RTMsgErrorExit(RTEXITCODE_FAILURE, "Failed to open the extension pack tarball: %Rrc ('%s')", rc, pszTarball);
     956        rcExit = RTMsgErrorExit(RTEXITCODE_FAILURE, "Failed to open the extension pack tarball: %Rrc ('%s')", vrc, pszTarball);
    957957
    958958    delete pstrMangledName;
     
    983983    };
    984984    RTGETOPTSTATE   GetState;
    985     int rc = RTGetOptInit(&GetState, argc, argv, s_aOptions, RT_ELEMENTS(s_aOptions), 0, 0 /*fFlags*/);
    986     if (RT_FAILURE(rc))
    987         return RTMsgErrorExit(RTEXITCODE_FAILURE, "RTGetOptInit failed: %Rrc\n", rc);
     985    int vrc = RTGetOptInit(&GetState, argc, argv, s_aOptions, RT_ELEMENTS(s_aOptions), 0, 0 /*fFlags*/);
     986    if (RT_FAILURE(vrc))
     987        return RTMsgErrorExit(RTEXITCODE_FAILURE, "RTGetOptInit failed: %Rrc\n", vrc);
    988988
    989989    const char     *pszBaseDir = NULL;
     
    10421042    /* Check that it exists. */
    10431043    char szExtPackDir[RTPATH_MAX];
    1044     rc = RTPathJoin(szExtPackDir, sizeof(szExtPackDir), pszBaseDir, strMangledName.c_str());
    1045     if (RT_FAILURE(rc))
    1046         return RTMsgErrorExit(RTEXITCODE_FAILURE, "Failed to construct extension pack path: %Rrc", rc);
     1044    vrc = RTPathJoin(szExtPackDir, sizeof(szExtPackDir), pszBaseDir, strMangledName.c_str());
     1045    if (RT_FAILURE(vrc))
     1046        return RTMsgErrorExit(RTEXITCODE_FAILURE, "Failed to construct extension pack path: %Rrc", vrc);
    10471047
    10481048    if (!RTDirExists(szExtPackDir))
     
    10791079    };
    10801080    RTGETOPTSTATE   GetState;
    1081     int rc = RTGetOptInit(&GetState, argc, argv, s_aOptions, RT_ELEMENTS(s_aOptions), 0, 0 /*fFlags*/);
    1082     if (RT_FAILURE(rc))
    1083         return RTMsgErrorExit(RTEXITCODE_FAILURE, "RTGetOptInit failed: %Rrc\n", rc);
     1081    int vrc = RTGetOptInit(&GetState, argc, argv, s_aOptions, RT_ELEMENTS(s_aOptions), 0, 0 /*fFlags*/);
     1082    if (RT_FAILURE(vrc))
     1083        return RTMsgErrorExit(RTEXITCODE_FAILURE, "RTGetOptInit failed: %Rrc\n", vrc);
    10841084
    10851085    const char     *pszBaseDir = NULL;
     
    11131113     */
    11141114    RTDIR hDir;
    1115     rc = RTDirOpen(&hDir, pszBaseDir);
    1116     if (RT_FAILURE(rc))
    1117         return RTMsgErrorExit(RTEXITCODE_FAILURE, "Failed open the base directory: %Rrc ('%s')", rc, pszBaseDir);
     1115    vrc = RTDirOpen(&hDir, pszBaseDir);
     1116    if (RT_FAILURE(vrc))
     1117        return RTMsgErrorExit(RTEXITCODE_FAILURE, "Failed open the base directory: %Rrc ('%s')", vrc, pszBaseDir);
    11181118
    11191119    uint32_t    cCleaned = 0;
     
    11221122    {
    11231123        RTDIRENTRYEX Entry;
    1124         rc = RTDirReadEx(hDir, &Entry, NULL /*pcbDirEntry*/, RTFSOBJATTRADD_NOTHING, RTPATH_F_ON_LINK);
    1125         if (RT_FAILURE(rc))
     1124        vrc = RTDirReadEx(hDir, &Entry, NULL /*pcbDirEntry*/, RTFSOBJATTRADD_NOTHING, RTPATH_F_ON_LINK);
     1125        if (RT_FAILURE(vrc))
    11261126        {
    1127             if (rc != VERR_NO_MORE_FILES)
    1128                 rcExit = RTMsgErrorExit(RTEXITCODE_FAILURE, "RTDirReadEx returns %Rrc", rc);
     1127            if (vrc != VERR_NO_MORE_FILES)
     1128                rcExit = RTMsgErrorExit(RTEXITCODE_FAILURE, "RTDirReadEx returns %Rrc", vrc);
    11291129            break;
    11301130        }
     
    11501150                 */
    11511151                char szPath[RTPATH_MAX];
    1152                 rc = RTPathJoin(szPath, sizeof(szPath), pszBaseDir, Entry.szName);
    1153                 if (RT_SUCCESS(rc))
     1152                vrc = RTPathJoin(szPath, sizeof(szPath), pszBaseDir, Entry.szName);
     1153                if (RT_SUCCESS(vrc))
    11541154                {
    11551155                    RTEXITCODE rcExit2 = RemoveExtPackDir(szPath, true /*fTemporary*/);
     
    11601160                }
    11611161                else
    1162                     rcExit = RTMsgErrorExit(RTEXITCODE_FAILURE, "RTPathJoin failed with %Rrc for '%s'", rc, Entry.szName);
     1162                    rcExit = RTMsgErrorExit(RTEXITCODE_FAILURE, "RTPathJoin failed with %Rrc for '%s'", vrc, Entry.szName);
    11631163                cCleaned++;
    11641164            }
     
    12051205    for (unsigned i = 0; i < RT_ELEMENTS(s_apszPaths); i++)
    12061206    {
    1207         int rc = RTPathJoin(pszPath, cbPath, s_apszPaths[i], pszName);
    1208         if (RT_SUCCESS(rc))
     1207        int vrc = RTPathJoin(pszPath, cbPath, s_apszPaths[i], pszName);
     1208        if (RT_SUCCESS(vrc))
    12091209        {
    12101210            RTFSOBJINFO ObjInfo;
    1211             rc = RTPathQueryInfoEx(pszPath, &ObjInfo, RTFSOBJATTRADD_UNIX, RTPATH_F_FOLLOW_LINK);
    1212             if (RT_SUCCESS(rc))
     1211            vrc = RTPathQueryInfoEx(pszPath, &ObjInfo, RTFSOBJATTRADD_UNIX, RTPATH_F_FOLLOW_LINK);
     1212            if (RT_SUCCESS(vrc))
    12131213            {
    12141214                if (!(ObjInfo.Attr.fMode & RTFS_UNIX_IWOTH))
     
    12331233static void CopyFileToStdXxx(RTFILE hSrc, PRTSTREAM pDst, bool fComplain)
    12341234{
    1235     int rc;
     1235    int vrc;
    12361236    for (;;)
    12371237    {
    12381238        char abBuf[0x1000];
    12391239        size_t cbRead;
    1240         rc = RTFileRead(hSrc, abBuf, sizeof(abBuf), &cbRead);
    1241         if (RT_FAILURE(rc))
     1240        vrc = RTFileRead(hSrc, abBuf, sizeof(abBuf), &cbRead);
     1241        if (RT_FAILURE(vrc))
    12421242        {
    1243             RTMsgError("RTFileRead failed: %Rrc", rc);
     1243            RTMsgError("RTFileRead failed: %Rrc", vrc);
    12441244            break;
    12451245        }
    12461246        if (!cbRead)
    12471247            break;
    1248         rc = RTStrmWrite(pDst, abBuf, cbRead);
    1249         if (RT_FAILURE(rc))
     1248        vrc = RTStrmWrite(pDst, abBuf, cbRead);
     1249        if (RT_FAILURE(vrc))
    12501250        {
    12511251            if (fComplain)
    1252                 RTMsgError("RTStrmWrite failed: %Rrc", rc);
     1252                RTMsgError("RTStrmWrite failed: %Rrc", vrc);
    12531253            break;
    12541254        }
    12551255    }
    1256     rc = RTStrmFlush(pDst);
    1257     if (RT_FAILURE(rc) && fComplain)
    1258         RTMsgError("RTStrmFlush failed: %Rrc", rc);
     1256    vrc = RTStrmFlush(pDst);
     1257    if (RT_FAILURE(vrc) && fComplain)
     1258        RTMsgError("RTStrmFlush failed: %Rrc", vrc);
    12591259}
    12601260
     
    12911291    Info.hwnd   = NULL;
    12921292    Info.lpVerb = L"runas";
    1293     int rc = RTStrToUtf16(pszExecPath, (PRTUTF16 *)&Info.lpFile);
    1294     if (RT_SUCCESS(rc))
     1293    int vrc = RTStrToUtf16(pszExecPath, (PRTUTF16 *)&Info.lpFile);
     1294    if (RT_SUCCESS(vrc))
    12951295    {
    12961296        char *pszCmdLine;
    1297         rc = RTGetOptArgvToString(&pszCmdLine, &papszArgs[cSuArgs + 1], RTGETOPTARGV_CNV_QUOTE_MS_CRT);
    1298         if (RT_SUCCESS(rc))
     1297        vrc = RTGetOptArgvToString(&pszCmdLine, &papszArgs[cSuArgs + 1], RTGETOPTARGV_CNV_QUOTE_MS_CRT);
     1298        if (RT_SUCCESS(vrc))
    12991299        {
    1300             rc = RTStrToUtf16(pszCmdLine, (PRTUTF16 *)&Info.lpParameters);
    1301             if (RT_SUCCESS(rc))
     1300            vrc = RTStrToUtf16(pszCmdLine, (PRTUTF16 *)&Info.lpParameters);
     1301            if (RT_SUCCESS(vrc))
    13021302            {
    13031303                Info.lpDirectory = NULL;
     
    13181318                    {
    13191319                        uint64_t u64Hwnd;
    1320                         rc = RTStrToUInt64Ex(pszArg + sizeof("hwnd=") - 1, NULL, 0, &u64Hwnd);
    1321                         if (RT_SUCCESS(rc))
     1320                        vrc = RTStrToUInt64Ex(pszArg + sizeof("hwnd=") - 1, NULL, 0, &u64Hwnd);
     1321                        if (RT_SUCCESS(vrc))
    13221322                        {
    13231323                            HWND hwnd = (HWND)(uintptr_t)u64Hwnd;
     
    13851385    }
    13861386    else
    1387         RTMsgError("RTStrToUtf16 failed: %Rc", rc);
     1387        RTMsgError("RTStrToUtf16 failed: %Rc", vrc);
    13881388
    13891389#elif defined(RT_OS_DARWIN)
    13901390    RT_NOREF(pszDisplayInfoHack);
    13911391    char szIconName[RTPATH_MAX];
    1392     int rc = RTPathAppPrivateArch(szIconName, sizeof(szIconName));
    1393     if (RT_SUCCESS(rc))
    1394         rc = RTPathAppend(szIconName, sizeof(szIconName), "../Resources/virtualbox.png");
    1395     if (RT_FAILURE(rc))
    1396         return RTMsgErrorExit(RTEXITCODE_FAILURE, "Failed to construct icon path: %Rrc", rc);
     1392    int vrc = RTPathAppPrivateArch(szIconName, sizeof(szIconName));
     1393    if (RT_SUCCESS(vrc))
     1394        vrc = RTPathAppend(szIconName, sizeof(szIconName), "../Resources/virtualbox.png");
     1395    if (RT_FAILURE(vrc))
     1396        return RTMsgErrorExit(RTEXITCODE_FAILURE, "Failed to construct icon path: %Rrc", vrc);
    13971397
    13981398    AuthorizationRef AuthRef;
     
    14711471     */
    14721472    char *pszCmdLine;
    1473     int rc = RTGetOptArgvToString(&pszCmdLine, &papszArgs[cSuArgs], RTGETOPTARGV_CNV_QUOTE_BOURNE_SH);
    1474     if (RT_FAILURE(rc))
    1475         return RTMsgErrorExit(RTEXITCODE_FAILURE, "RTGetOptArgvToString failed: %Rrc", rc);
     1473    int vrc = RTGetOptArgvToString(&pszCmdLine, &papszArgs[cSuArgs], RTGETOPTARGV_CNV_QUOTE_BOURNE_SH);
     1474    if (RT_FAILURE(vrc))
     1475        return RTMsgErrorExit(RTEXITCODE_FAILURE, "RTGetOptArgvToString failed: %Rrc", vrc);
    14761476
    14771477    /*
     
    15791579         */
    15801580        RTPROCESS hProcess;
    1581         rc = RTProcCreateEx(papszArgs[iSuArg], &papszArgs[iSuArg], RTENV_DEFAULT, 0 /*fFlags*/, NULL /*phStdIn*/,
    1582                             NULL /*phStdOut*/, NULL /*phStdErr*/, NULL /*pszAsUser*/, NULL /*pszPassword*/, NULL /* pvExtraData*/,
    1583                             &hProcess);
    1584         if (RT_SUCCESS(rc))
     1581        vrc = RTProcCreateEx(papszArgs[iSuArg], &papszArgs[iSuArg], RTENV_DEFAULT, 0 /*fFlags*/, NULL /*phStdIn*/,
     1582                             NULL /*phStdOut*/, NULL /*phStdErr*/, NULL /*pszAsUser*/, NULL /*pszPassword*/, NULL /* pvExtraData*/,
     1583                             &hProcess);
     1584        if (RT_SUCCESS(vrc))
    15851585        {
    15861586            RTPROCSTATUS Status;
    1587             rc = RTProcWait(hProcess, RTPROCWAIT_FLAGS_BLOCK, &Status);
    1588             if (RT_SUCCESS(rc))
     1587            vrc = RTProcWait(hProcess, RTPROCWAIT_FLAGS_BLOCK, &Status);
     1588            if (RT_SUCCESS(vrc))
    15891589            {
    15901590                if (Status.enmReason == RTPROCEXITREASON_NORMAL)
     
    15941594            }
    15951595            else
    1596                 RTMsgError("Error while waiting for '%s': %Rrc", papszArgs[iSuArg], rc);
     1596                RTMsgError("Error while waiting for '%s': %Rrc", papszArgs[iSuArg], vrc);
    15971597        }
    15981598        else
    1599             RTMsgError("Failed to execute '%s': %Rrc", papszArgs[iSuArg], rc);
     1599            RTMsgError("Failed to execute '%s': %Rrc", papszArgs[iSuArg], vrc);
    16001600    }
    16011601    RTStrFree(pszCmdLine);
     
    16281628     */
    16291629    char szTempDir[RTPATH_MAX - sizeof("/stderr")];
    1630     int rc = RTPathTemp(szTempDir, sizeof(szTempDir));
    1631     if (RT_FAILURE(rc))
    1632         return RTMsgErrorExit(RTEXITCODE_FAILURE, "RTPathTemp failed: %Rrc", rc);
    1633     rc = RTPathAppend(szTempDir, sizeof(szTempDir), "VBoxExtPackHelper-XXXXXX");
    1634     if (RT_FAILURE(rc))
    1635         return RTMsgErrorExit(RTEXITCODE_FAILURE, "RTPathAppend failed: %Rrc", rc);
    1636     rc = RTDirCreateTemp(szTempDir, 0700);
    1637     if (RT_FAILURE(rc))
    1638         return RTMsgErrorExit(RTEXITCODE_FAILURE, "RTDirCreateTemp failed: %Rrc", rc);
     1630    int vrc = RTPathTemp(szTempDir, sizeof(szTempDir));
     1631    if (RT_FAILURE(vrc))
     1632        return RTMsgErrorExit(RTEXITCODE_FAILURE, "RTPathTemp failed: %Rrc", vrc);
     1633    vrc = RTPathAppend(szTempDir, sizeof(szTempDir), "VBoxExtPackHelper-XXXXXX");
     1634    if (RT_FAILURE(vrc))
     1635        return RTMsgErrorExit(RTEXITCODE_FAILURE, "RTPathAppend failed: %Rrc", vrc);
     1636    vrc = RTDirCreateTemp(szTempDir, 0700);
     1637    if (RT_FAILURE(vrc))
     1638        return RTMsgErrorExit(RTEXITCODE_FAILURE, "RTDirCreateTemp failed: %Rrc", vrc);
    16391639
    16401640    RTEXITCODE rcExit = RTEXITCODE_FAILURE;
    16411641    char szStdOut[RTPATH_MAX];
    16421642    char szStdErr[RTPATH_MAX];
    1643     rc = RTPathJoin(szStdOut, sizeof(szStdOut), szTempDir, "stdout");
    1644     if (RT_SUCCESS(rc))
    1645         rc = RTPathJoin(szStdErr, sizeof(szStdErr), szTempDir, "stderr");
    1646     if (RT_SUCCESS(rc))
     1643    vrc = RTPathJoin(szStdOut, sizeof(szStdOut), szTempDir, "stdout");
     1644    if (RT_SUCCESS(vrc))
     1645        vrc = RTPathJoin(szStdErr, sizeof(szStdErr), szTempDir, "stderr");
     1646    if (RT_SUCCESS(vrc))
    16471647    {
    16481648        RTFILE hStdOut;
    1649         rc = RTFileOpen(&hStdOut, szStdOut, RTFILE_O_READWRITE | RTFILE_O_CREATE | RTFILE_O_DENY_NONE
    1650                         | (0600 << RTFILE_O_CREATE_MODE_SHIFT));
    1651         if (RT_SUCCESS(rc))
     1649        vrc = RTFileOpen(&hStdOut, szStdOut, RTFILE_O_READWRITE | RTFILE_O_CREATE | RTFILE_O_DENY_NONE
     1650                         | (0600 << RTFILE_O_CREATE_MODE_SHIFT));
     1651        if (RT_SUCCESS(vrc))
    16521652        {
    16531653            RTFILE hStdErr;
    1654             rc = RTFileOpen(&hStdErr, szStdErr, RTFILE_O_READWRITE | RTFILE_O_CREATE | RTFILE_O_DENY_NONE
    1655                             | (0600 << RTFILE_O_CREATE_MODE_SHIFT));
    1656             if (RT_SUCCESS(rc))
     1654            vrc = RTFileOpen(&hStdErr, szStdErr, RTFILE_O_READWRITE | RTFILE_O_CREATE | RTFILE_O_DENY_NONE
     1655                             | (0600 << RTFILE_O_CREATE_MODE_SHIFT));
     1656            if (RT_SUCCESS(vrc))
    16571657            {
    16581658                /*
     
    18151815
    18161816    RTFSOBJINFO ObjInfo;
    1817     int rc = RTPathQueryInfoEx(szExecPath, &ObjInfo, RTFSOBJATTRADD_UNIX, RTPATH_F_ON_LINK);
    1818     if (RT_FAILURE(rc))
     1817    int vrc = RTPathQueryInfoEx(szExecPath, &ObjInfo, RTFSOBJATTRADD_UNIX, RTPATH_F_ON_LINK);
     1818    if (RT_FAILURE(vrc))
    18191819        return RTMsgErrorExit(RTEXITCODE_FAILURE, "RTPathQueryInfoEx failed");
    18201820
     
    18331833     */
    18341834#ifdef RT_OS_WINDOWS
    1835     int rc = RTR3InitExe(argc, &argv, RTR3INIT_FLAGS_UTF8_ARGV); /* WinMain gives us UTF-8, see below. */
     1835    int vrc = RTR3InitExe(argc, &argv, RTR3INIT_FLAGS_UTF8_ARGV); /* WinMain gives us UTF-8, see below. */
    18361836#else
    1837     int rc = RTR3InitExe(argc, &argv, 0);
    1838 #endif
    1839     if (RT_FAILURE(rc))
    1840         return RTMsgInitFailure(rc);
     1837    int vrc = RTR3InitExe(argc, &argv, 0);
     1838#endif
     1839    if (RT_FAILURE(vrc))
     1840        return RTMsgInitFailure(vrc);
    18411841
    18421842    SUPR3HardenedVerifyInit();
    18431843    RTERRINFOSTATIC ErrInfo;
    18441844    RTErrInfoInitStatic(&ErrInfo);
    1845     rc = SUPR3HardenedVerifySelf(argv[0], true /*fInternal*/, &ErrInfo.Core);
    1846     if (RT_FAILURE(rc))
     1845    vrc = SUPR3HardenedVerifySelf(argv[0], true /*fInternal*/, &ErrInfo.Core);
     1846    if (RT_FAILURE(vrc))
    18471847        return RTMsgErrorExit(RTEXITCODE_FAILURE, "%s", ErrInfo.Core.pszMsg);
    18481848
     
    18751875    };
    18761876    RTGETOPTSTATE GetState;
    1877     rc = RTGetOptInit(&GetState, argc, argv, s_aOptions, RT_ELEMENTS(s_aOptions), 1, 0 /*fFlags*/);
    1878     if (RT_FAILURE(rc))
    1879         return RTMsgErrorExit(RTEXITCODE_FAILURE, "RTGetOptInit failed: %Rrc\n", rc);
     1877    vrc = RTGetOptInit(&GetState, argc, argv, s_aOptions, RT_ELEMENTS(s_aOptions), 1, 0 /*fFlags*/);
     1878    if (RT_FAILURE(vrc))
     1879        return RTMsgErrorExit(RTEXITCODE_FAILURE, "RTGetOptInit failed: %Rrc\n", vrc);
    18801880    for (;;)
    18811881    {
     
    19431943# ifdef RT_OS_WINDOWS
    19441944                PRTUTF16 pwszName = NULL;
    1945                 rc = RTStrToUtf16(ValueUnion.psz, &pwszName);
    1946                 if (RT_FAILURE(rc))
    1947                     return RTMsgErrorExit(RTEXITCODE_FAILURE, "Error converting '%s' to UTF-16: %Rrc\n", ValueUnion.psz, rc);
     1945                vrc = RTStrToUtf16(ValueUnion.psz, &pwszName);
     1946                if (RT_FAILURE(vrc))
     1947                    return RTMsgErrorExit(RTEXITCODE_FAILURE, "Error converting '%s' to UTF-16: %Rrc\n", ValueUnion.psz, vrc);
    19481948                FILE *pFile = _wfreopen(pwszName, L"r+", ch == OPT_STDOUT ? stdout : stderr);
    19491949                RTUtf16Free(pwszName);
     
    19531953                if (!pFile)
    19541954                {
    1955                     rc = RTErrConvertFromErrno(errno);
    1956                     return RTMsgErrorExit(RTEXITCODE_FAILURE, "freopen on '%s': %Rrc", ValueUnion.psz, rc);
     1955                    vrc = RTErrConvertFromErrno(errno);
     1956                    return RTMsgErrorExit(RTEXITCODE_FAILURE, "freopen on '%s': %Rrc", ValueUnion.psz, vrc);
    19571957                }
    19581958                break;
     
    19851985    NOREF(hPrevInstance); NOREF(nShowCmd); NOREF(lpCmdLine);
    19861986
    1987     int rc = RTR3InitExeNoArguments(0);
    1988     if (RT_FAILURE(rc))
    1989         return RTMsgInitFailure(rc);
     1987    int vrc = RTR3InitExeNoArguments(0);
     1988    if (RT_FAILURE(vrc))
     1989        return RTMsgInitFailure(vrc);
    19901990
    19911991    LPWSTR pwszCmdLine = GetCommandLineW();
     
    19941994
    19951995    char *pszCmdLine;
    1996     rc = RTUtf16ToUtf8(pwszCmdLine, &pszCmdLine); /* leaked */
    1997     if (RT_FAILURE(rc))
    1998         return RTMsgErrorExit(RTEXITCODE_FAILURE, "Failed to convert the command line: %Rrc", rc);
     1996    vrc = RTUtf16ToUtf8(pwszCmdLine, &pszCmdLine); /* leaked */
     1997    if (RT_FAILURE(vrc))
     1998        return RTMsgErrorExit(RTEXITCODE_FAILURE, "Failed to convert the command line: %Rrc", vrc);
    19991999
    20002000    int    cArgs;
    20012001    char **papszArgs;
    2002     rc = RTGetOptArgvFromString(&papszArgs, &cArgs, pszCmdLine, RTGETOPTARGV_CNV_QUOTE_MS_CRT, NULL);
    2003     if (RT_SUCCESS(rc))
    2004     {
    2005 
    2006         rc = main(cArgs, papszArgs);
     2002    vrc = RTGetOptArgvFromString(&papszArgs, &cArgs, pszCmdLine, RTGETOPTARGV_CNV_QUOTE_MS_CRT, NULL);
     2003    if (RT_SUCCESS(vrc))
     2004    {
     2005        vrc = main(cArgs, papszArgs);
    20072006
    20082007        RTGetOptArgvFree(papszArgs);
    20092008    }
    20102009    else
    2011         rc = RTMsgErrorExit(RTEXITCODE_FAILURE, "RTGetOptArgvFromString failed: %Rrc", rc);
     2010        vrc = RTMsgErrorExit(RTEXITCODE_FAILURE, "RTGetOptArgvFromString failed: %Rrc", vrc);
    20122011    RTStrFree(pszCmdLine);
    20132012
    2014     return rc;
    2015 }
    2016 #endif
    2017 
     2013    return vrc;
     2014}
     2015#endif
     2016
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