Lines Matching refs:pOpts

146  * @param   pOpts               The tar options.
151 typedef RTEXITCODE (*PFNDOWITHMEMBER)(PRTZIPTARCMDOPS pOpts, RTVFSOBJ hVfsObj, const char *pszName, RTEXITCODE rcExit);
180 * @param pOpts The options.
183 static RTEXITCODE rtZipTarCmdOpenInputArchive(PRTZIPTARCMDOPS pOpts, PRTVFSFSSTREAM phVfsFss)
191 if ( pOpts->pszFile
192 && strcmp(pOpts->pszFile, "-") != 0)
195 rc = RTVfsChainOpenIoStream(pOpts->pszFile,
206 rc, pOpts->pszFile, pszError - pOpts->pszFile, "");
208 "Failed with %Rrc opening the input archive '%s'", rc, pOpts->pszFile);
225 switch (pOpts->chZipper)
248 RTMsgError("unknown decompression method '%c'", pOpts->chZipper);
267 if (pOpts->enmFormat == RTZIPTARFORMAT_TAR)
269 else if (pOpts->enmFormat == RTZIPTARFORMAT_XAR)
289 * @param pOpts The tar options.
292 static RTEXITCODE rtZipTarDoWithMembers(PRTZIPTARCMDOPS pOpts, PFNDOWITHMEMBER pfnCallback)
299 if (pOpts->cFiles)
301 pbmFound = (uint32_t *)RTMemAllocZ(((pOpts->cFiles + 31) / 32) * sizeof(uint32_t));
311 RTEXITCODE rcExit = rtZipTarCmdOpenInputArchive(pOpts, &hVfsFssIn);
336 if ( !pOpts->cFiles
337 || rtZipTarCmdIsNameInArray(pszName, pOpts->papszFiles, &iFile) )
342 rcExit = pfnCallback(pOpts, hVfsObj, pszName, rcExit);
355 for (uint32_t iFile = 0; iFile < pOpts->cFiles; iFile++)
358 RTMsgError("%s: Was not found in the archive", pOpts->papszFiles[iFile]);
405 * @param pOpts The tar options.
411 static RTEXITCODE rtZipTarQueryExtractOwner(PRTZIPTARCMDOPS pOpts, PCRTFSOBJINFO pOwner, const char *pszName, RTEXITCODE rcExit,
414 if (pOpts->uidOwner != NIL_RTUID)
415 *pUid = pOpts->uidOwner;
416 else if (pOpts->fPreserveGroup)
436 * @param pOpts The tar options.
442 static RTEXITCODE rtZipTarQueryExtractGroup(PRTZIPTARCMDOPS pOpts, PCRTFSOBJINFO pGroup, const char *pszName, RTEXITCODE rcExit,
445 if (pOpts->gidGroup != NIL_RTGID)
446 *pGid = pOpts->gidGroup;
447 else if (pOpts->fPreserveGroup)
471 * @param pOpts The tar options.
478 static RTEXITCODE rtZipTarCmdExtractFile(PRTZIPTARCMDOPS pOpts, RTVFSOBJ hVfsObj, RTEXITCODE rcExit,
505 if (!pOpts->fNoModTime)
513 if ( pOpts->uidOwner != NIL_RTUID
514 || pOpts->gidGroup != NIL_RTGID
515 || pOpts->fPreserveOwner
516 || pOpts->fPreserveGroup)
519 rcExit = rtZipTarQueryExtractOwner(pOpts, pOwner, pszDst, rcExit, &uidFile);
522 rcExit = rtZipTarQueryExtractGroup(pOpts, pGroup, pszDst, rcExit, &gidFile);
532 RTFMODE fMode = (pUnixInfo->Attr.fMode & pOpts->fFileModeAndMask) | pOpts->fFileModeOrMask;
552 static RTEXITCODE rtZipTarCmdExtractCallback(PRTZIPTARCMDOPS pOpts, RTVFSOBJ hVfsObj, const char *pszName, RTEXITCODE rcExit)
554 if (pOpts->fVerbose)
604 rc = RTPathJoin(szDst, sizeof(szDst), pOpts->pszDirectory ? pOpts->pszDirectory : ".", pszName);
614 return rtZipTarCmdExtractFile(pOpts, hVfsObj, rcExit, szDst, &UnixInfo, &Owner, &Group);
647 if (!pOpts->fNoModTime)
655 if ( pOpts->uidOwner != NIL_RTUID
656 || pOpts->gidGroup != NIL_RTGID
657 || pOpts->fPreserveOwner
658 || pOpts->fPreserveGroup)
661 rcExit = rtZipTarQueryExtractOwner(pOpts, &Owner, szDst, rcExit, &uidFile);
664 rcExit = rtZipTarQueryExtractGroup(pOpts, &Group, szDst, rcExit, &gidFile);
679 fMode = (UnixInfo.Attr.fMode & (pOpts->fDirModeAndMask | RTFS_TYPE_MASK)) | pOpts->fDirModeOrMask;
681 fMode = (UnixInfo.Attr.fMode & (pOpts->fFileModeAndMask | RTFS_TYPE_MASK)) | pOpts->fFileModeOrMask;
695 static RTEXITCODE rtZipTarCmdListCallback(PRTZIPTARCMDOPS pOpts, RTVFSOBJ hVfsObj, const char *pszName, RTEXITCODE rcExit)
700 if (!pOpts->fVerbose)
803 if (!pOpts->fDisplayUtc)