Index: trunk/src/VBox/Main/src-all/ExtPackUtil.cpp
===================================================================
--- trunk/src/VBox/Main/src-all/ExtPackUtil.cpp	(revision 94714)
+++ trunk/src/VBox/Main/src-all/ExtPackUtil.cpp	(revision 94912)
@@ -341,7 +341,7 @@
      */
     RTFSOBJINFO ObjInfo;
-    int rc = RTVfsFileQueryInfo(hVfsFile, &ObjInfo, RTFSOBJATTRADD_UNIX);
-    if (RT_FAILURE(rc))
-        return &(new RTCString)->printf(ExtPackUtil::tr("RTVfsFileQueryInfo failed: %Rrc"), rc);
+    int vrc = RTVfsFileQueryInfo(hVfsFile, &ObjInfo, RTFSOBJATTRADD_UNIX);
+    if (RT_FAILURE(vrc))
+        return &(new RTCString)->printf(ExtPackUtil::tr("RTVfsFileQueryInfo failed: %Rrc"), vrc);
     if (a_pObjInfo)
         *a_pObjInfo = ObjInfo;
@@ -359,7 +359,7 @@
 
     /* Rewind to the start of the file. */
-    rc = RTVfsFileSeek(hVfsFile, 0, RTFILE_SEEK_BEGIN, NULL);
-    if (RT_FAILURE(rc))
-        return &(new RTCString)->printf(ExtPackUtil::tr("RTVfsFileSeek(,0,BEGIN) failed: %Rrc"), rc);
+    vrc = RTVfsFileSeek(hVfsFile, 0, RTFILE_SEEK_BEGIN, NULL);
+    if (RT_FAILURE(vrc))
+        return &(new RTCString)->printf(ExtPackUtil::tr("RTVfsFileSeek(,0,BEGIN) failed: %Rrc"), vrc);
 
     /* Allocate memory and read the file content into it. */
@@ -369,7 +369,7 @@
 
     RTCString *pstrErr = NULL;
-    rc = RTVfsFileRead(hVfsFile, pvFile, cbFile, NULL);
-    if (RT_FAILURE(rc))
-        pstrErr = &(new RTCString)->printf(ExtPackUtil::tr("RTVfsFileRead failed: %Rrc"), rc);
+    vrc = RTVfsFileRead(hVfsFile, pvFile, cbFile, NULL);
+    if (RT_FAILURE(vrc))
+        pstrErr = &(new RTCString)->printf(ExtPackUtil::tr("RTVfsFileRead failed: %Rrc"), vrc);
 
     /*
@@ -377,5 +377,5 @@
      */
     xml::Document Doc;
-    if (RT_SUCCESS(rc))
+    if (RT_SUCCESS(vrc))
     {
         xml::XmlMemParser   Parser;
@@ -388,5 +388,5 @@
         {
             pstrErr = new RTCString(rErr.what());
-            rc = VERR_PARSE_ERROR;
+            vrc = VERR_PARSE_ERROR;
         }
     }
@@ -396,5 +396,5 @@
      * Hand the xml doc over to the common code.
      */
-    if (RT_SUCCESS(rc))
+    if (RT_SUCCESS(vrc))
         try
         {
@@ -650,5 +650,5 @@
     {
         /** @todo Should probably restrict this to known build types (alpha,
-         *        beta, rc, ++). */
+         *        beta, release candidate, ++). */
         do
             pszVersion++;
@@ -708,6 +708,6 @@
  * RTStrPrintfv wrapper.
  *
- * @returns @a rc
- * @param   rc                  The status code to return.
+ * @returns @a vrc
+ * @param   vrc                 The status code to return.
  * @param   pszError            The error buffer.
  * @param   cbError             The size of the buffer.
@@ -715,5 +715,5 @@
  * @param   ...                 Format arguments.
  */
-static int vboxExtPackReturnError(int rc, char *pszError, size_t cbError, const char *pszFormat, ...)
+static int vboxExtPackReturnError(int vrc, char *pszError, size_t cbError, const char *pszFormat, ...)
 {
     va_list va;
@@ -721,5 +721,5 @@
     RTStrPrintfV(pszError, cbError, pszFormat, va);
     va_end(va);
-    return rc;
+    return vrc;
 }
 
@@ -769,11 +769,11 @@
     /** @todo drop this restriction after the old install interface is
      *        dropped. */
-    int rc = VINF_SUCCESS;
+    int vrc = VINF_SUCCESS;
     if (   pszExtPackName
         && !ExtPackDesc.strName.equalsIgnoreCase(pszExtPackName))
-        rc = vboxExtPackReturnError(VERR_NOT_EQUAL, pszError, cbError,
-                                    ExtPackUtil::tr("The name of the downloaded file and the name stored inside the extension pack does not match"
-                                    " (xml='%s' file='%s')"), ExtPackDesc.strName.c_str(), pszExtPackName);
-    return rc;
+        vrc = vboxExtPackReturnError(VERR_NOT_EQUAL, pszError, cbError,
+                                     ExtPackUtil::tr("The name of the downloaded file and the name stored inside the extension pack does not match"
+                                     " (xml='%s' file='%s')"), ExtPackDesc.strName.c_str(), pszExtPackName);
+    return vrc;
 }
 
@@ -794,17 +794,17 @@
      * Read the manifest from the extension pack.
      */
-    int rc = RTVfsFileSeek(hManifestFile, 0, RTFILE_SEEK_BEGIN, NULL);
-    if (RT_FAILURE(rc))
-        return vboxExtPackReturnError(rc, pszError, cbError, ExtPackUtil::tr("RTVfsFileSeek failed: %Rrc"), rc);
+    int vrc = RTVfsFileSeek(hManifestFile, 0, RTFILE_SEEK_BEGIN, NULL);
+    if (RT_FAILURE(vrc))
+        return vboxExtPackReturnError(vrc, pszError, cbError, ExtPackUtil::tr("RTVfsFileSeek failed: %Rrc"), vrc);
 
     RTMANIFEST hTheirManifest;
-    rc = RTManifestCreate(0 /*fFlags*/, &hTheirManifest);
-    if (RT_FAILURE(rc))
-        return vboxExtPackReturnError(rc, pszError, cbError, ExtPackUtil::tr("RTManifestCreate failed: %Rrc"), rc);
+    vrc = RTManifestCreate(0 /*fFlags*/, &hTheirManifest);
+    if (RT_FAILURE(vrc))
+        return vboxExtPackReturnError(vrc, pszError, cbError, ExtPackUtil::tr("RTManifestCreate failed: %Rrc"), vrc);
 
     RTVFSIOSTREAM hVfsIos = RTVfsFileToIoStream(hManifestFile);
-    rc = RTManifestReadStandard(hTheirManifest, hVfsIos);
+    vrc = RTManifestReadStandard(hTheirManifest, hVfsIos);
     RTVfsIoStrmRelease(hVfsIos);
-    if (RT_SUCCESS(rc))
+    if (RT_SUCCESS(vrc))
     {
         /*
@@ -820,8 +820,8 @@
         };
         char szError[RTPATH_MAX];
-        rc = RTManifestEqualsEx(hOurManifest, hTheirManifest, &s_apszIgnoreEntries[0], NULL,
-                                RTMANIFEST_EQUALS_IGN_MISSING_ATTRS /*fFlags*/,
-                                szError, sizeof(szError));
-        if (RT_SUCCESS(rc))
+        vrc = RTManifestEqualsEx(hOurManifest, hTheirManifest, &s_apszIgnoreEntries[0], NULL,
+                                 RTMANIFEST_EQUALS_IGN_MISSING_ATTRS /*fFlags*/,
+                                 szError, sizeof(szError));
+        if (RT_SUCCESS(vrc))
         {
             /*
@@ -832,8 +832,8 @@
 
         }
-        else if (rc == VERR_NOT_EQUAL && szError[0])
+        else if (vrc == VERR_NOT_EQUAL && szError[0])
             vboxExtPackSetError(pszError, cbError, ExtPackUtil::tr("Manifest mismatch: %s"), szError);
         else
-            vboxExtPackSetError(pszError, cbError, ExtPackUtil::tr("RTManifestEqualsEx failed: %Rrc"), rc);
+            vboxExtPackSetError(pszError, cbError, ExtPackUtil::tr("RTManifestEqualsEx failed: %Rrc"), vrc);
 #if 0
         RTVFSIOSTREAM hVfsIosStdOut = NIL_RTVFSIOSTREAM;
@@ -846,8 +846,8 @@
     }
     else
-        vboxExtPackSetError(pszError, cbError, ExtPackUtil::tr("Error parsing '%s': %Rrc"), VBOX_EXTPACK_MANIFEST_NAME, rc);
+        vboxExtPackSetError(pszError, cbError, ExtPackUtil::tr("Error parsing '%s': %Rrc"), VBOX_EXTPACK_MANIFEST_NAME, vrc);
 
     RTManifestRelease(hTheirManifest);
-    return rc;
+    return vrc;
 }
 
@@ -871,7 +871,7 @@
      */
     char szCalculatedDigest[RTSHA256_DIGEST_LEN + 1];
-    int rc = RTManifestEntryQueryAttr(hFileManifest, "extpack", NULL /*no name*/, RTMANIFEST_ATTR_SHA256,
-                                      szCalculatedDigest, sizeof(szCalculatedDigest), NULL);
-    if (RT_SUCCESS(rc))
+    int vrc = RTManifestEntryQueryAttr(hFileManifest, "extpack", NULL /*no name*/, RTMANIFEST_ATTR_SHA256,
+                                       szCalculatedDigest, sizeof(szCalculatedDigest), NULL);
+    if (RT_SUCCESS(vrc))
     {
         /*
@@ -881,6 +881,6 @@
          */
         uint8_t abCalculatedHash[RTSHA256_HASH_SIZE];
-        rc = RTSha256FromString(szCalculatedDigest, abCalculatedHash);
-        if (RT_SUCCESS(rc))
+        vrc = RTSha256FromString(szCalculatedDigest, abCalculatedHash);
+        if (RT_SUCCESS(vrc))
         {
             if (   pszFileDigest
@@ -888,6 +888,6 @@
             {
                 uint8_t abFileHash[RTSHA256_HASH_SIZE];
-                rc = RTSha256FromString(pszFileDigest, abFileHash);
-                if (RT_SUCCESS(rc))
+                vrc = RTSha256FromString(pszFileDigest, abFileHash);
+                if (RT_SUCCESS(vrc))
                 {
                     if (memcmp(abFileHash, abCalculatedHash, sizeof(abFileHash)))
@@ -895,9 +895,9 @@
                         vboxExtPackSetError(pszError, cbError,
                                             ExtPackUtil::tr("The extension pack file has changed (SHA-256 mismatch)"));
-                        rc = VERR_NOT_EQUAL;
+                        vrc = VERR_NOT_EQUAL;
                     }
                 }
                 else
-                    vboxExtPackSetError(pszError, cbError, ExtPackUtil::tr("Bad SHA-256 '%s': %Rrc"), szCalculatedDigest, rc);
+                    vboxExtPackSetError(pszError, cbError, ExtPackUtil::tr("Bad SHA-256 '%s': %Rrc"), szCalculatedDigest, vrc);
             }
 
@@ -905,5 +905,5 @@
              * Set the output hash on success.
              */
-            if (pStrDigest && RT_SUCCESS(rc))
+            if (pStrDigest && RT_SUCCESS(vrc))
             {
                 try
@@ -913,14 +913,14 @@
                 catch (std::bad_alloc &)
                 {
-                    rc = VERR_NO_MEMORY;
+                    vrc = VERR_NO_MEMORY;
                 }
             }
         }
         else
-            vboxExtPackSetError(pszError, cbError, ExtPackUtil::tr("Bad SHA-256 '%s': %Rrc"), szCalculatedDigest, rc);
+            vboxExtPackSetError(pszError, cbError, ExtPackUtil::tr("Bad SHA-256 '%s': %Rrc"), szCalculatedDigest, vrc);
     }
     else
-        vboxExtPackSetError(pszError, cbError, "RTManifestEntryGetAttr: %Rrc", rc);
-    return rc;
+        vboxExtPackSetError(pszError, cbError, "RTManifestEntryGetAttr: %Rrc", vrc);
+    return vrc;
 }
 
@@ -945,5 +945,5 @@
                                            PRTVFSOBJ phVfsObj, PRTVFSFILE phVfsFile, char *pszError, size_t cbError)
 {
-    int rc;
+    int vrc;
 
     /*
@@ -951,23 +951,23 @@
      */
     if (phVfsFile && *phVfsFile != NIL_RTVFSFILE)
-        rc = vboxExtPackReturnError(VERR_DUPLICATE, pszError, cbError,
-                                    ExtPackUtil::tr("There can only be one '%s'"), pszAdjName);
+        vrc = vboxExtPackReturnError(VERR_DUPLICATE, pszError, cbError,
+                                     ExtPackUtil::tr("There can only be one '%s'"), pszAdjName);
     else if (enmType != RTVFSOBJTYPE_IO_STREAM && enmType != RTVFSOBJTYPE_FILE)
-        rc = vboxExtPackReturnError(VERR_NOT_A_FILE, pszError, cbError,
-                                    ExtPackUtil::tr("Standard member '%s' is not a file"), pszAdjName);
+        vrc = vboxExtPackReturnError(VERR_NOT_A_FILE, pszError, cbError,
+                                     ExtPackUtil::tr("Standard member '%s' is not a file"), pszAdjName);
     else
     {
         RTFSOBJINFO ObjInfo;
-        rc = RTVfsObjQueryInfo(*phVfsObj, &ObjInfo, RTFSOBJATTRADD_NOTHING);
-        if (RT_SUCCESS(rc))
+        vrc = RTVfsObjQueryInfo(*phVfsObj, &ObjInfo, RTFSOBJATTRADD_NOTHING);
+        if (RT_SUCCESS(vrc))
         {
             if (!RTFS_IS_FILE(ObjInfo.Attr.fMode))
-                rc = vboxExtPackReturnError(VERR_NOT_A_FILE, pszError, cbError,
-                                            ExtPackUtil::tr("Standard member '%s' is not a file"), pszAdjName);
+                vrc = vboxExtPackReturnError(VERR_NOT_A_FILE, pszError, cbError,
+                                             ExtPackUtil::tr("Standard member '%s' is not a file"), pszAdjName);
             else if (ObjInfo.cbObject >= _1M)
-                rc = vboxExtPackReturnError(VERR_OUT_OF_RANGE, pszError, cbError,
-                                            ExtPackUtil::tr("Standard member '%s' is too large: %'RU64 bytes (max 1 MB)", "",
-                                                            (size_t)ObjInfo.cbObject),
-                                            pszAdjName, (uint64_t)ObjInfo.cbObject);
+                vrc = vboxExtPackReturnError(VERR_OUT_OF_RANGE, pszError, cbError,
+                                             ExtPackUtil::tr("Standard member '%s' is too large: %'RU64 bytes (max 1 MB)", "",
+                                                             (size_t)ObjInfo.cbObject),
+                                             pszAdjName, (uint64_t)ObjInfo.cbObject);
             else
             {
@@ -978,17 +978,17 @@
                 RTVFSIOSTREAM hVfsIos = RTVfsObjToIoStream(*phVfsObj);
                 RTVFSFILE     hVfsFile;
-                rc = RTVfsMemorizeIoStreamAsFile(hVfsIos, RTFILE_O_READ, &hVfsFile);
-                if (RT_SUCCESS(rc))
+                vrc = RTVfsMemorizeIoStreamAsFile(hVfsIos, RTFILE_O_READ, &hVfsFile);
+                if (RT_SUCCESS(vrc))
                 {
-                    rc = RTVfsIoStrmValidateUtf8Encoding(hVfsIos,
-                                                         RTVFS_VALIDATE_UTF8_BY_RTC_3629 | RTVFS_VALIDATE_UTF8_NO_NULL,
-                                                         NULL);
-                    if (RT_SUCCESS(rc))
+                    vrc = RTVfsIoStrmValidateUtf8Encoding(hVfsIos,
+                                                          RTVFS_VALIDATE_UTF8_BY_RTC_3629 | RTVFS_VALIDATE_UTF8_NO_NULL,
+                                                          NULL);
+                    if (RT_SUCCESS(vrc))
                     {
                         /*
                          * Replace *phVfsObj with the memorized file.
                          */
-                        rc = RTVfsFileSeek(hVfsFile, 0, RTFILE_SEEK_BEGIN, NULL);
-                        if (RT_SUCCESS(rc))
+                        vrc = RTVfsFileSeek(hVfsFile, 0, RTFILE_SEEK_BEGIN, NULL);
+                        if (RT_SUCCESS(vrc))
                         {
                             RTVfsObjRelease(*phVfsObj);
@@ -997,8 +997,8 @@
                         else
                             vboxExtPackSetError(pszError, cbError,
-                                                ExtPackUtil::tr("RTVfsFileSeek failed on '%s': %Rrc"), pszAdjName, rc);
+                                                ExtPackUtil::tr("RTVfsFileSeek failed on '%s': %Rrc"), pszAdjName, vrc);
                     }
 
-                    if (phVfsFile && RT_SUCCESS(rc))
+                    if (phVfsFile && RT_SUCCESS(vrc))
                         *phVfsFile = hVfsFile;
                     else
@@ -1007,12 +1007,12 @@
                 else
                     vboxExtPackSetError(pszError, cbError,
-                                        ExtPackUtil::tr("RTVfsMemorizeIoStreamAsFile failed on '%s': %Rrc"), pszAdjName, rc);
+                                        ExtPackUtil::tr("RTVfsMemorizeIoStreamAsFile failed on '%s': %Rrc"), pszAdjName, vrc);
                 RTVfsIoStrmRelease(hVfsIos);
             }
         }
         else
-            vboxExtPackSetError(pszError, cbError, ExtPackUtil::tr("RTVfsObjQueryInfo failed on '%s': %Rrc"), pszAdjName, rc);
-    }
-    return rc;
+            vboxExtPackSetError(pszError, cbError, ExtPackUtil::tr("RTVfsObjQueryInfo failed on '%s': %Rrc"), pszAdjName, vrc);
+    }
+    return vrc;
 }
 
@@ -1100,24 +1100,24 @@
 static int vboxExtPackValidateMemberFile(const char *pszName, RTVFSOBJ hVfsObj, char *pszError, size_t cbError)
 {
-    int rc = vboxExtPackValidateMemberName(pszName, pszError, cbError);
-    if (RT_SUCCESS(rc))
+    int vrc = vboxExtPackValidateMemberName(pszName, pszError, cbError);
+    if (RT_SUCCESS(vrc))
     {
         RTFSOBJINFO ObjInfo;
-        rc = RTVfsObjQueryInfo(hVfsObj, &ObjInfo, RTFSOBJATTRADD_NOTHING);
-        if (RT_SUCCESS(rc))
+        vrc = RTVfsObjQueryInfo(hVfsObj, &ObjInfo, RTFSOBJATTRADD_NOTHING);
+        if (RT_SUCCESS(vrc))
         {
             if (ObjInfo.cbObject >= 9*_1G64)
-                rc = vboxExtPackReturnError(VERR_OUT_OF_RANGE, pszError, cbError,
-                                            ExtPackUtil::tr("'%s': too large (%'RU64 bytes)", "", (size_t)ObjInfo.cbObject),
-                                            pszName, (uint64_t)ObjInfo.cbObject);
+                vrc = vboxExtPackReturnError(VERR_OUT_OF_RANGE, pszError, cbError,
+                                             ExtPackUtil::tr("'%s': too large (%'RU64 bytes)", "", (size_t)ObjInfo.cbObject),
+                                             pszName, (uint64_t)ObjInfo.cbObject);
             if (!RTFS_IS_FILE(ObjInfo.Attr.fMode))
-                rc = vboxExtPackReturnError(VERR_NOT_A_FILE, pszError, cbError,
-                                            ExtPackUtil::tr("The alleged file '%s' has a mode mask stating otherwise (%RTfmode)"),
-                                            pszName, ObjInfo.Attr.fMode);
+                vrc = vboxExtPackReturnError(VERR_NOT_A_FILE, pszError, cbError,
+                                             ExtPackUtil::tr("The alleged file '%s' has a mode mask stating otherwise (%RTfmode)"),
+                                             pszName, ObjInfo.Attr.fMode);
         }
         else
-            vboxExtPackSetError(pszError, cbError, ExtPackUtil::tr("RTVfsObjQueryInfo failed on '%s': %Rrc"), pszName, rc);
-    }
-    return rc;
+            vboxExtPackSetError(pszError, cbError, ExtPackUtil::tr("RTVfsObjQueryInfo failed on '%s': %Rrc"), pszName, vrc);
+    }
+    return vrc;
 }
 
@@ -1134,20 +1134,20 @@
 static int vboxExtPackValidateMemberDir(const char *pszName, RTVFSOBJ hVfsObj, char *pszError, size_t cbError)
 {
-    int rc = vboxExtPackValidateMemberName(pszName, pszError, cbError);
-    if (RT_SUCCESS(rc))
+    int vrc = vboxExtPackValidateMemberName(pszName, pszError, cbError);
+    if (RT_SUCCESS(vrc))
     {
         RTFSOBJINFO ObjInfo;
-        rc = RTVfsObjQueryInfo(hVfsObj, &ObjInfo, RTFSOBJATTRADD_NOTHING);
-        if (RT_SUCCESS(rc))
+        vrc = RTVfsObjQueryInfo(hVfsObj, &ObjInfo, RTFSOBJATTRADD_NOTHING);
+        if (RT_SUCCESS(vrc))
         {
             if (!RTFS_IS_DIRECTORY(ObjInfo.Attr.fMode))
-                rc = vboxExtPackReturnError(VERR_NOT_A_DIRECTORY, pszError, cbError,
-                                            ExtPackUtil::tr("The alleged directory '%s' has a mode mask saying differently (%RTfmode)"),
-                                            pszName, ObjInfo.Attr.fMode);
+                vrc = vboxExtPackReturnError(VERR_NOT_A_DIRECTORY, pszError, cbError,
+                                             ExtPackUtil::tr("The alleged directory '%s' has a mode mask saying differently (%RTfmode)"),
+                                             pszName, ObjInfo.Attr.fMode);
         }
         else
-            vboxExtPackSetError(pszError, cbError, ExtPackUtil::tr("RTVfsObjQueryInfo failed on '%s': %Rrc"), pszName, rc);
-    }
-    return rc;
+            vboxExtPackSetError(pszError, cbError, ExtPackUtil::tr("RTVfsObjQueryInfo failed on '%s': %Rrc"), pszName, vrc);
+    }
+    return vrc;
 }
 
@@ -1167,15 +1167,15 @@
     *pszError = '\0';
 
-    int rc;
+    int vrc;
     if (   enmType == RTVFSOBJTYPE_FILE
         || enmType == RTVFSOBJTYPE_IO_STREAM)
-        rc = vboxExtPackValidateMemberFile(pszName, hVfsObj, pszError, cbError);
+        vrc = vboxExtPackValidateMemberFile(pszName, hVfsObj, pszError, cbError);
     else if (   enmType == RTVFSOBJTYPE_DIR
              || enmType == RTVFSOBJTYPE_BASE)
-        rc = vboxExtPackValidateMemberDir(pszName, hVfsObj, pszError, cbError);
+        vrc = vboxExtPackValidateMemberDir(pszName, hVfsObj, pszError, cbError);
     else
-        rc = vboxExtPackReturnError(VERR_UNEXPECTED_FS_OBJ_TYPE, pszError, cbError,
-                                    ExtPackUtil::tr("'%s' is not a file or directory (enmType=%d)"), pszName, enmType);
-    return rc;
+        vrc = vboxExtPackReturnError(VERR_UNEXPECTED_FS_OBJ_TYPE, pszError, cbError,
+                                     ExtPackUtil::tr("'%s' is not a file or directory (enmType=%d)"), pszName, enmType);
+    return vrc;
 }
 
@@ -1205,31 +1205,31 @@
      * Rewind the file and set up a VFS chain for it.
      */
-    int rc = RTFileSeek(hTarballFile, 0, RTFILE_SEEK_BEGIN, NULL);
-    if (RT_FAILURE(rc))
-        return vboxExtPackReturnError(rc, pszError, cbError,
-                                      ExtPackUtil::tr("Failed seeking to the start of the tarball: %Rrc"), rc);
+    int vrc = RTFileSeek(hTarballFile, 0, RTFILE_SEEK_BEGIN, NULL);
+    if (RT_FAILURE(vrc))
+        return vboxExtPackReturnError(vrc, pszError, cbError,
+                                      ExtPackUtil::tr("Failed seeking to the start of the tarball: %Rrc"), vrc);
 
     RTVFSIOSTREAM hTarballIos;
-    rc = RTVfsIoStrmFromRTFile(hTarballFile, RTFILE_O_READ | RTFILE_O_DENY_WRITE | RTFILE_O_OPEN, true /*fLeaveOpen*/,
-                               &hTarballIos);
-    if (RT_FAILURE(rc))
-        return vboxExtPackReturnError(rc, pszError, cbError, ExtPackUtil::tr("RTVfsIoStrmFromRTFile failed: %Rrc"), rc);
+    vrc = RTVfsIoStrmFromRTFile(hTarballFile, RTFILE_O_READ | RTFILE_O_DENY_WRITE | RTFILE_O_OPEN, true /*fLeaveOpen*/,
+                                &hTarballIos);
+    if (RT_FAILURE(vrc))
+        return vboxExtPackReturnError(vrc, pszError, cbError, ExtPackUtil::tr("RTVfsIoStrmFromRTFile failed: %Rrc"), vrc);
 
     RTMANIFEST hFileManifest = NIL_RTMANIFEST;
-    rc = RTManifestCreate(0 /*fFlags*/, &hFileManifest);
-    if (RT_SUCCESS(rc))
+    vrc = RTManifestCreate(0 /*fFlags*/, &hFileManifest);
+    if (RT_SUCCESS(vrc))
     {
         RTVFSIOSTREAM hPtIos;
-        rc = RTManifestEntryAddPassthruIoStream(hFileManifest, hTarballIos, "extpack", RTMANIFEST_ATTR_SHA256,
-                                                true /*read*/, &hPtIos);
-        if (RT_SUCCESS(rc))
+        vrc = RTManifestEntryAddPassthruIoStream(hFileManifest, hTarballIos, "extpack", RTMANIFEST_ATTR_SHA256,
+                                                 true /*read*/, &hPtIos);
+        if (RT_SUCCESS(vrc))
         {
             RTVFSIOSTREAM hGunzipIos;
-            rc = RTZipGzipDecompressIoStream(hPtIos, 0 /*fFlags*/, &hGunzipIos);
-            if (RT_SUCCESS(rc))
+            vrc = RTZipGzipDecompressIoStream(hPtIos, 0 /*fFlags*/, &hGunzipIos);
+            if (RT_SUCCESS(vrc))
             {
                 RTVFSFSSTREAM hTarFss;
-                rc = RTZipTarFsStreamFromIoStream(hGunzipIos, 0 /*fFlags*/, &hTarFss);
-                if (RT_SUCCESS(rc))
+                vrc = RTZipTarFsStreamFromIoStream(hGunzipIos, 0 /*fFlags*/, &hTarFss);
+                if (RT_SUCCESS(vrc))
                 {
                     RTVfsIoStrmRelease(hPtIos);
@@ -1244,20 +1244,20 @@
                 }
 
-                vboxExtPackSetError(pszError, cbError, ExtPackUtil::tr("RTZipTarFsStreamFromIoStream failed: %Rrc"), rc);
+                vboxExtPackSetError(pszError, cbError, ExtPackUtil::tr("RTZipTarFsStreamFromIoStream failed: %Rrc"), vrc);
                 RTVfsIoStrmRelease(hGunzipIos);
             }
             else
-                vboxExtPackSetError(pszError, cbError, ExtPackUtil::tr("RTZipGzipDecompressIoStream failed: %Rrc"), rc);
+                vboxExtPackSetError(pszError, cbError, ExtPackUtil::tr("RTZipGzipDecompressIoStream failed: %Rrc"), vrc);
             RTVfsIoStrmRelease(hPtIos);
         }
         else
-            vboxExtPackSetError(pszError, cbError, ExtPackUtil::tr("RTManifestEntryAddPassthruIoStream failed: %Rrc"), rc);
+            vboxExtPackSetError(pszError, cbError, ExtPackUtil::tr("RTManifestEntryAddPassthruIoStream failed: %Rrc"), vrc);
         RTManifestRelease(hFileManifest);
     }
     else
-        vboxExtPackSetError(pszError, cbError, ExtPackUtil::tr("RTManifestCreate failed: %Rrc"), rc);
+        vboxExtPackSetError(pszError, cbError, ExtPackUtil::tr("RTManifestCreate failed: %Rrc"), vrc);
 
     RTVfsIoStrmRelease(hTarballIos);
-    return rc;
+    return vrc;
 }
 
@@ -1311,11 +1311,11 @@
     RTMANIFEST      hFileManifest;
     RTVFSFSSTREAM   hTarFss;
-    int rc = VBoxExtPackOpenTarFss(hTarballFile, pszError, cbError, &hTarFss, &hFileManifest);
-    if (RT_FAILURE(rc))
-        return rc;
+    int vrc = VBoxExtPackOpenTarFss(hTarballFile, pszError, cbError, &hTarFss, &hFileManifest);
+    if (RT_FAILURE(vrc))
+        return vrc;
 
     RTMANIFEST hOurManifest;
-    rc = RTManifestCreate(0 /*fFlags*/, &hOurManifest);
-    if (RT_SUCCESS(rc))
+    vrc = RTManifestCreate(0 /*fFlags*/, &hOurManifest);
+    if (RT_SUCCESS(vrc))
     {
         /*
@@ -1333,11 +1333,11 @@
             RTVFSOBJ        hVfsObj;
             RTVFSOBJTYPE    enmType;
-            rc = RTVfsFsStrmNext(hTarFss, &pszName, &enmType, &hVfsObj);
-            if (RT_FAILURE(rc))
+            vrc = RTVfsFsStrmNext(hTarFss, &pszName, &enmType, &hVfsObj);
+            if (RT_FAILURE(vrc))
             {
-                if (rc != VERR_EOF)
-                    vboxExtPackSetError(pszError, cbError, ExtPackUtil::tr("RTVfsFsStrmNext failed: %Rrc"), rc);
+                if (vrc != VERR_EOF)
+                    vboxExtPackSetError(pszError, cbError, ExtPackUtil::tr("RTVfsFsStrmNext failed: %Rrc"), vrc);
                 else
-                    rc = VINF_SUCCESS;
+                    vrc = VINF_SUCCESS;
                 break;
             }
@@ -1351,6 +1351,6 @@
              *      failure - cleanup reasons.
              */
-            rc = VBoxExtPackValidateMember(pszName, enmType, hVfsObj, pszError, cbError);
-            if (RT_SUCCESS(rc))
+            vrc = VBoxExtPackValidateMember(pszName, enmType, hVfsObj, pszError, cbError);
+            if (RT_SUCCESS(vrc))
             {
                 PRTVFSFILE phVfsFile = NULL;
@@ -1362,7 +1362,7 @@
                     phVfsFile = &hSignatureFile;
                 else if (!strncmp(pszAdjName, VBOX_EXTPACK_LICENSE_NAME_PREFIX, sizeof(VBOX_EXTPACK_LICENSE_NAME_PREFIX) - 1))
-                    rc = VBoxExtPackValidateStandardFile(pszAdjName, enmType, &hVfsObj, NULL, pszError, cbError);
+                    vrc = VBoxExtPackValidateStandardFile(pszAdjName, enmType, &hVfsObj, NULL, pszError, cbError);
                 if (phVfsFile)
-                    rc = VBoxExtPackValidateStandardFile(pszAdjName, enmType, &hVfsObj, phVfsFile, pszError, cbError);
+                    vrc = VBoxExtPackValidateStandardFile(pszAdjName, enmType, &hVfsObj, phVfsFile, pszError, cbError);
             }
 
@@ -1370,13 +1370,13 @@
              * Add any I/O stream to the manifest
              */
-            if (   RT_SUCCESS(rc)
+            if (   RT_SUCCESS(vrc)
                 && (   enmType == RTVFSOBJTYPE_FILE
                     || enmType == RTVFSOBJTYPE_IO_STREAM))
             {
                 RTVFSIOSTREAM hVfsIos = RTVfsObjToIoStream(hVfsObj);
-                rc = RTManifestEntryAddIoStream(hOurManifest, hVfsIos, pszAdjName, RTMANIFEST_ATTR_SIZE | RTMANIFEST_ATTR_SHA256);
-                if (RT_FAILURE(rc))
+                vrc = RTManifestEntryAddIoStream(hOurManifest, hVfsIos, pszAdjName, RTMANIFEST_ATTR_SIZE | RTMANIFEST_ATTR_SHA256);
+                if (RT_FAILURE(vrc))
                     vboxExtPackSetError(pszError, cbError,
-                                        ExtPackUtil::tr("RTManifestEntryAddIoStream failed on '%s': %Rrc"), pszAdjName, rc);
+                                        ExtPackUtil::tr("RTManifestEntryAddIoStream failed on '%s': %Rrc"), pszAdjName, vrc);
                 RTVfsIoStrmRelease(hVfsIos);
             }
@@ -1387,5 +1387,5 @@
             RTVfsObjRelease(hVfsObj);
             RTStrFree(pszName);
-            if (RT_FAILURE(rc))
+            if (RT_FAILURE(vrc))
                 break;
         }
@@ -1394,9 +1394,9 @@
          * Check the integrity of the tarball file.
          */
-        if (RT_SUCCESS(rc))
+        if (RT_SUCCESS(vrc))
         {
             RTVfsFsStrmRelease(hTarFss);
             hTarFss = NIL_RTVFSFSSTREAM;
-            rc = vboxExtPackVerifyFileDigest(hFileManifest, pszTarballDigest, pStrDigest, pszError, cbError);
+            vrc = vboxExtPackVerifyFileDigest(hFileManifest, pszTarballDigest, pStrDigest, pszError, cbError);
         }
 
@@ -1405,15 +1405,15 @@
          * mandatory files are present.
          */
-        if (RT_SUCCESS(rc))
+        if (RT_SUCCESS(vrc))
         {
             if (hXmlFile == NIL_RTVFSFILE)
-                rc = vboxExtPackReturnError(VERR_MISSING, pszError, cbError, ExtPackUtil::tr("Mandator file '%s' is missing"),
-                                            VBOX_EXTPACK_DESCRIPTION_NAME);
+                vrc = vboxExtPackReturnError(VERR_MISSING, pszError, cbError, ExtPackUtil::tr("Mandator file '%s' is missing"),
+                                             VBOX_EXTPACK_DESCRIPTION_NAME);
             if (hManifestFile == NIL_RTVFSFILE)
-                rc = vboxExtPackReturnError(VERR_MISSING, pszError, cbError, ExtPackUtil::tr("Mandator file '%s' is missing"),
-                                            VBOX_EXTPACK_MANIFEST_NAME);
+                vrc = vboxExtPackReturnError(VERR_MISSING, pszError, cbError, ExtPackUtil::tr("Mandator file '%s' is missing"),
+                                             VBOX_EXTPACK_MANIFEST_NAME);
             if (hSignatureFile == NIL_RTVFSFILE)
-                rc = vboxExtPackReturnError(VERR_MISSING, pszError, cbError, ExtPackUtil::tr("Mandator file '%s' is missing"),
-                                            VBOX_EXTPACK_SIGNATURE_NAME);
+                vrc = vboxExtPackReturnError(VERR_MISSING, pszError, cbError, ExtPackUtil::tr("Mandator file '%s' is missing"),
+                                             VBOX_EXTPACK_SIGNATURE_NAME);
         }
 
@@ -1421,17 +1421,17 @@
          * Check the manifest and it's signature.
          */
-        if (RT_SUCCESS(rc))
-            rc = vboxExtPackVerifyManifestAndSignature(hOurManifest, hManifestFile, hSignatureFile, pszError, cbError);
+        if (RT_SUCCESS(vrc))
+            vrc = vboxExtPackVerifyManifestAndSignature(hOurManifest, hManifestFile, hSignatureFile, pszError, cbError);
 
         /*
          * Check the XML.
          */
-        if (RT_SUCCESS(rc))
-            rc = vboxExtPackVerifyXml(hXmlFile, pszExtPackName, pszError, cbError);
+        if (RT_SUCCESS(vrc))
+            vrc = vboxExtPackVerifyXml(hXmlFile, pszExtPackName, pszError, cbError);
 
         /*
          * Returns objects.
          */
-        if (RT_SUCCESS(rc))
+        if (RT_SUCCESS(vrc))
         {
             if (phValidManifest)
@@ -1456,9 +1456,9 @@
     }
     else
-        vboxExtPackSetError(pszError, cbError, "RTManifestCreate failed: %Rrc", rc);
+        vboxExtPackSetError(pszError, cbError, "RTManifestCreate failed: %Rrc", vrc);
     RTVfsFsStrmRelease(hTarFss);
     RTManifestRelease(hFileManifest);
 
-    return rc;
-}
-
+    return vrc;
+}
+
