Changeset 72035 in vbox for trunk/src/VBox/Runtime/common
- Timestamp:
- Apr 26, 2018 11:33:32 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/zip/tarcmd.cpp
r69111 r72035 313 313 &hVfsIos); 314 314 if (RT_FAILURE(rc)) 315 return RTMsgErrorExit (RTEXITCODE_FAILURE,"Failed to prepare standard output for writing: %Rrc", rc);315 return RTMsgErrorExitFailure("Failed to prepare standard output for writing: %Rrc", rc); 316 316 } 317 317 … … 402 402 } 403 403 else 404 rc = RTMsgErrorExit (RTEXITCODE_FAILURE,"Failed to open tar filesystem stream: %Rrc", rc);404 rc = RTMsgErrorExitFailure("Failed to open tar filesystem stream: %Rrc", rc); 405 405 } 406 406 else … … 408 408 RTVfsIoStrmRelease(hVfsIos); 409 409 if (RT_FAILURE(rc)) 410 return RTMsgErrorExit (RTEXITCODE_FAILURE,"Failed to open tar filesystem stream: %Rrc", rc);410 return RTMsgErrorExitFailure("Failed to open tar filesystem stream: %Rrc", rc); 411 411 412 412 return RTEXITCODE_SUCCESS; … … 592 592 &hVfsIos); 593 593 if (RT_FAILURE(rc)) 594 return RTMsgErrorExit (RTEXITCODE_FAILURE,"Failed to prepare standard in for reading: %Rrc", rc);594 return RTMsgErrorExitFailure("Failed to prepare standard in for reading: %Rrc", rc); 595 595 } 596 596 … … 653 653 RTVfsIoStrmRelease(hVfsIos); 654 654 if (RT_FAILURE(rc)) 655 return RTMsgErrorExit (RTEXITCODE_FAILURE,"Failed to open tar filesystem stream: %Rrc", rc);655 return RTMsgErrorExitFailure("Failed to open tar filesystem stream: %Rrc", rc); 656 656 657 657 return RTEXITCODE_SUCCESS; … … 677 677 pbmFound = (uint32_t *)RTMemAllocZ(((pOpts->cFiles + 31) / 32) * sizeof(uint32_t)); 678 678 if (!pbmFound) 679 return RTMsgErrorExit (RTEXITCODE_FAILURE,"Failed to allocate the found-file-bitmap");679 return RTMsgErrorExitFailure("Failed to allocate the found-file-bitmap"); 680 680 } 681 681 … … 702 702 { 703 703 if (rc != VERR_EOF) 704 rcExit = RTMsgErrorExit (RTEXITCODE_FAILURE,"RTVfsFsStrmNext returned %Rrc", rc);704 rcExit = RTMsgErrorExitFailure("RTVfsFsStrmNext returned %Rrc", rc); 705 705 break; 706 706 } … … 774 774 } 775 775 776 776 777 #if !defined(RT_OS_WINDOWS) && !defined(RT_OS_OS2) 777 778 … … 798 799 { 799 800 *pUid = NIL_RTUID; 800 return RTMsgErrorExit (RTEXITCODE_FAILURE,"%s: User resolving is not implemented.", pszName);801 return RTMsgErrorExitFailure("%s: User resolving is not implemented.", pszName); 801 802 } 802 803 } … … 829 830 { 830 831 *pGid = NIL_RTGID; 831 return RTMsgErrorExit (RTEXITCODE_FAILURE,"%s: Group resolving is not implemented.", pszName);832 return RTMsgErrorExitFailure("%s: Group resolving is not implemented.", pszName); 832 833 } 833 834 } … … 841 842 842 843 /** 844 * Corrects the file mode and other attributes. 845 * 846 * Common worker for rtZipTarCmdExtractFile and rtZipTarCmdExtractHardlink. 847 * 848 * @returns rcExit or RTEXITCODE_FAILURE. 849 * @param pOpts The tar options. 850 * @param rcExit The current exit code. 851 * @param hFile The handle to the destination file. 852 * @param pszDst The destination path (for error reporting). 853 * @param pUnixInfo The unix fs object info. 854 * @param pOwner The owner info. 855 * @param pGroup The group info. 856 */ 857 static RTEXITCODE rtZipTarCmdExtractSetAttribs(PRTZIPTARCMDOPS pOpts, RTEXITCODE rcExit, RTFILE hFile, const char *pszDst, 858 PCRTFSOBJINFO pUnixInfo, PCRTFSOBJINFO pOwner, PCRTFSOBJINFO pGroup) 859 { 860 int rc; 861 862 if (!pOpts->fNoModTime) 863 { 864 rc = RTFileSetTimes(hFile, NULL, &pUnixInfo->ModificationTime, NULL, NULL); 865 if (RT_FAILURE(rc)) 866 rcExit = RTMsgErrorExitFailure("%s: Error setting times: %Rrc", pszDst, rc); 867 } 868 869 #if !defined(RT_OS_WINDOWS) && !defined(RT_OS_OS2) 870 if ( pOpts->uidOwner != NIL_RTUID 871 || pOpts->gidGroup != NIL_RTGID 872 || pOpts->fPreserveOwner 873 || pOpts->fPreserveGroup) 874 { 875 RTUID uidFile; 876 rcExit = rtZipTarQueryExtractOwner(pOpts, pOwner, pszDst, rcExit, &uidFile); 877 878 RTGID gidFile; 879 rcExit = rtZipTarQueryExtractGroup(pOpts, pGroup, pszDst, rcExit, &gidFile); 880 if (uidFile != NIL_RTUID || gidFile != NIL_RTGID) 881 { 882 rc = RTFileSetOwner(hFile, uidFile, gidFile); 883 if (RT_FAILURE(rc)) 884 rcExit = RTMsgErrorExitFailure("%s: Error owner/group: %Rrc", pszDst, rc); 885 } 886 } 887 #else 888 RT_NOREF_PV(pOwner); RT_NOREF_PV(pGroup); 889 #endif 890 891 RTFMODE fMode = (pUnixInfo->Attr.fMode & pOpts->fFileModeAndMask) | pOpts->fFileModeOrMask; 892 rc = RTFileSetMode(hFile, fMode | RTFS_TYPE_FILE); 893 if (RT_FAILURE(rc)) 894 rcExit = RTMsgErrorExitFailure("%s: Error changing mode: %Rrc", pszDst, rc); 895 896 return rcExit; 897 } 898 899 900 /** 901 * Extracts a hard linked file. 902 * 903 * @returns rcExit or RTEXITCODE_FAILURE. 904 * @param pOpts The tar options. 905 * @param rcExit The current exit code. 906 * @param pszDst The destination path. 907 * @param pszTarget The target relative path. 908 * @param pUnixInfo The unix fs object info. 909 * @param pOwner The owner info. 910 * @param pGroup The group info. 911 */ 912 static RTEXITCODE rtZipTarCmdExtractHardlink(PRTZIPTARCMDOPS pOpts, RTEXITCODE rcExit, const char *pszDst, 913 const char *pszTarget, PCRTFSOBJINFO pUnixInfo, PCRTFSOBJINFO pOwner, 914 PCRTFSOBJINFO pGroup) 915 { 916 /* 917 * Construct full target path and check that it exists. 918 */ 919 char szFullTarget[RTPATH_MAX]; 920 int rc = RTPathJoin(szFullTarget, sizeof(szFullTarget), pOpts->pszDirectory ? pOpts->pszDirectory : ".", pszTarget); 921 if (RT_FAILURE(rc)) 922 return RTMsgErrorExitFailure("%s: Failed to construct full hardlink target path for %s: %Rrc", 923 pszDst, pszTarget, rc); 924 925 if (!RTFileExists(szFullTarget)) 926 return RTMsgErrorExitFailure("%s: Hardlink target not found (or not a file): %s", pszDst, szFullTarget, rc); 927 928 /* 929 * Try hardlink the file, falling back on copying. 930 */ 931 /** @todo actual hardlinking */ 932 if (true) 933 { 934 RTMsgWarning("%s: Hardlinking not available, copying '%s' instead.", pszDst, szFullTarget); 935 936 RTFILE hSrcFile; 937 rc = RTFileOpen(&hSrcFile, szFullTarget, RTFILE_O_READ | RTFILE_O_DENY_WRITE | RTFILE_O_OPEN); 938 if (RT_SUCCESS(rc)) 939 { 940 uint32_t fOpen = RTFILE_O_READWRITE | RTFILE_O_DENY_WRITE | RTFILE_O_CREATE_REPLACE | RTFILE_O_ACCESS_ATTR_DEFAULT 941 | ((RTFS_UNIX_IWUSR | RTFS_UNIX_IRUSR) << RTFILE_O_CREATE_MODE_SHIFT); 942 RTFILE hDstFile; 943 rc = RTFileOpen(&hDstFile, pszDst, fOpen); 944 if (RT_SUCCESS(rc)) 945 { 946 rc = RTFileCopyByHandles(hSrcFile, hDstFile); 947 if (RT_SUCCESS(rc)) 948 { 949 rcExit = rtZipTarCmdExtractSetAttribs(pOpts, rcExit, hDstFile, pszDst, pUnixInfo, pOwner, pGroup); 950 rc = RTFileClose(hDstFile); 951 if (RT_FAILURE(rc)) 952 { 953 rcExit = RTMsgErrorExitFailure("%s: Error closing hardlinked file copy: %Rrc", pszDst, szFullTarget, rc); 954 RTFileDelete(pszDst); 955 } 956 } 957 else 958 { 959 rcExit = RTMsgErrorExitFailure("%s: Failed copying hardlinked file %s: %Rrc", pszDst, szFullTarget, rc); 960 rc = RTFileClose(hDstFile); 961 RTFileDelete(pszDst); 962 } 963 } 964 else 965 rcExit = RTMsgErrorExitFailure("%s: Error creating file: %Rrc", pszDst, rc); 966 RTFileClose(hSrcFile); 967 } 968 else 969 rcExit = RTMsgErrorExitFailure("%s: Error opening file '%s' for reading (hardlink target): %Rrc", 970 pszDst, szFullTarget, rc); 971 } 972 973 return rcExit; 974 } 975 976 977 978 /** 843 979 * Extracts a file. 844 980 * … … 850 986 * @param hVfsObj The tar object to display 851 987 * @param rcExit The current exit code. 988 * @param pszDst The destination path. 852 989 * @param pUnixInfo The unix fs object info. 853 990 * @param pOwner The owner info. … … 865 1002 int rc = RTFileOpen(&hFile, pszDst, fOpen); 866 1003 if (RT_FAILURE(rc)) 867 return RTMsgErrorExit (RTEXITCODE_FAILURE,"%s: Error creating file: %Rrc", pszDst, rc);1004 return RTMsgErrorExitFailure("%s: Error creating file: %Rrc", pszDst, rc); 868 1005 869 1006 RTVFSIOSTREAM hVfsIosDst; … … 889 1026 890 1027 /* 891 * Pump the data thru .1028 * Pump the data thru and correct the file attributes. 892 1029 */ 893 1030 rc = RTVfsUtilPumpIoStreams(hVfsIosSrc, hVfsIosDst, (uint32_t)RT_MIN(pUnixInfo->cbObject, _1M)); 894 1031 if (RT_SUCCESS(rc)) 895 { 896 /* 897 * Correct the file mode and other attributes. 898 */ 899 if (!pOpts->fNoModTime) 900 { 901 rc = RTFileSetTimes(hFile, NULL, &pUnixInfo->ModificationTime, NULL, NULL); 902 if (RT_FAILURE(rc)) 903 rcExit = RTMsgErrorExit(RTEXITCODE_FAILURE, "%s: Error setting times: %Rrc", pszDst, rc); 904 } 905 906 #if !defined(RT_OS_WINDOWS) && !defined(RT_OS_OS2) 907 if ( pOpts->uidOwner != NIL_RTUID 908 || pOpts->gidGroup != NIL_RTGID 909 || pOpts->fPreserveOwner 910 || pOpts->fPreserveGroup) 911 { 912 RTUID uidFile; 913 rcExit = rtZipTarQueryExtractOwner(pOpts, pOwner, pszDst, rcExit, &uidFile); 914 915 RTGID gidFile; 916 rcExit = rtZipTarQueryExtractGroup(pOpts, pGroup, pszDst, rcExit, &gidFile); 917 if (uidFile != NIL_RTUID || gidFile != NIL_RTGID) 918 { 919 rc = RTFileSetOwner(hFile, uidFile, gidFile); 920 if (RT_FAILURE(rc)) 921 rcExit = RTMsgErrorExit(RTEXITCODE_FAILURE, "%s: Error owner/group: %Rrc", pszDst, rc); 922 } 923 } 924 #else 925 RT_NOREF_PV(pOwner); RT_NOREF_PV(pGroup); 926 #endif 927 928 RTFMODE fMode = (pUnixInfo->Attr.fMode & pOpts->fFileModeAndMask) | pOpts->fFileModeOrMask; 929 rc = RTFileSetMode(hFile, fMode | RTFS_TYPE_FILE); 930 if (RT_FAILURE(rc)) 931 rcExit = RTMsgErrorExit(RTEXITCODE_FAILURE, "%s: Error changing mode: %Rrc", pszDst, rc); 932 } 1032 rcExit = rtZipTarCmdExtractSetAttribs(pOpts, rcExit, hFile, pszDst, pUnixInfo, pOwner, pGroup); 933 1033 else 934 rcExit = RTMsgErrorExit (RTEXITCODE_FAILURE,"%s: Error writing out file: %Rrc", pszDst, rc);1034 rcExit = RTMsgErrorExitFailure("%s: Error writing out file: %Rrc", pszDst, rc); 935 1035 RTVfsIoStrmRelease(hVfsIosSrc); 936 1036 RTVfsIoStrmRelease(hVfsIosDst); 937 1037 } 938 1038 else 939 rcExit = RTMsgErrorExit (RTEXITCODE_FAILURE,"%s: Error creating I/O stream for file: %Rrc", pszDst, rc);1039 rcExit = RTMsgErrorExitFailure("%s: Error creating I/O stream for file: %Rrc", pszDst, rc); 940 1040 RTFileClose(hFile); 941 1041 return rcExit; … … 957 1057 int rc = RTVfsObjQueryInfo(hVfsObj, &UnixInfo, RTFSOBJATTRADD_UNIX); 958 1058 if (RT_FAILURE(rc)) 959 return RTMsgErrorExit (RTEXITCODE_FAILURE,"RTVfsObjQueryInfo returned %Rrc on '%s'", rc, pszName);1059 return RTMsgErrorExitFailure("RTVfsObjQueryInfo returned %Rrc on '%s'", rc, pszName); 960 1060 961 1061 RTFSOBJINFO Owner; … … 973 1073 rc, pszName); 974 1074 1075 bool fIsHardLink = false; 975 1076 char szTarget[RTPATH_MAX]; 976 1077 szTarget[0] = '\0'; … … 981 1082 RTVfsSymlinkRelease(hVfsSymlink); 982 1083 if (RT_FAILURE(rc)) 983 return RTMsgErrorExit(RTEXITCODE_FAILURE, "%s: RTVfsSymlinkRead failed: %Rrc", pszName, rc); 1084 return RTMsgErrorExitFailure("%s: RTVfsSymlinkRead failed: %Rrc", pszName, rc); 1085 if (!szTarget[0]) 1086 return RTMsgErrorExitFailure("%s: Link target is empty.", pszName); 984 1087 if (!RTFS_IS_SYMLINK(UnixInfo.Attr.fMode)) 985 return RTMsgErrorExit(RTEXITCODE_FAILURE, "%s: Hardlinks are not supported.", pszName); 986 if (!szTarget[0]) 987 return RTMsgErrorExit(RTEXITCODE_FAILURE, "%s: Link target is empty.", pszName); 1088 { 1089 fIsHardLink = true; 1090 if (!RTFS_IS_FILE(UnixInfo.Attr.fMode)) 1091 return RTMsgErrorExitFailure("%s: Hardlinks are only supported for regular files (target=%s).", 1092 pszName, szTarget); 1093 if (rtZipTarHasEscapeSequence(pszName)) 1094 return RTMsgErrorExitFailure("%s: Hardlink target '%s' contains an escape sequence.", 1095 pszName, szTarget); 1096 } 988 1097 } 989 1098 else if (RTFS_IS_SYMLINK(UnixInfo.Attr.fMode)) 990 return RTMsgErrorExit (RTEXITCODE_FAILURE,"Failed to get symlink object for '%s'", pszName);1099 return RTMsgErrorExitFailure("Failed to get symlink object for '%s'", pszName); 991 1100 992 1101 if (rtZipTarHasEscapeSequence(pszName)) 993 return RTMsgErrorExit (RTEXITCODE_FAILURE,"Name '%s' contains an escape sequence.", pszName);1102 return RTMsgErrorExitFailure("Name '%s' contains an escape sequence.", pszName); 994 1103 995 1104 /* … … 999 1108 rc = RTPathJoin(szDst, sizeof(szDst), pOpts->pszDirectory ? pOpts->pszDirectory : ".", pszName); 1000 1109 if (RT_FAILURE(rc)) 1001 return RTMsgErrorExit (RTEXITCODE_FAILURE,"%s: Failed to construct destination path for: %Rrc", pszName, rc);1110 return RTMsgErrorExitFailure("%s: Failed to construct destination path for: %Rrc", pszName, rc); 1002 1111 1003 1112 /* 1004 1113 * Extract according to the type. 1005 1114 */ 1006 switch (UnixInfo.Attr.fMode & RTFS_TYPE_MASK) 1007 { 1008 case RTFS_TYPE_FILE: 1009 return rtZipTarCmdExtractFile(pOpts, hVfsObj, rcExit, szDst, &UnixInfo, &Owner, &Group); 1010 1011 case RTFS_TYPE_DIRECTORY: 1012 rc = RTDirCreateFullPath(szDst, UnixInfo.Attr.fMode & RTFS_UNIX_ALL_ACCESS_PERMS); 1013 if (RT_FAILURE(rc)) 1014 return RTMsgErrorExit(RTEXITCODE_FAILURE, "%s: Error creating directory: %Rrc", szDst, rc); 1015 break; 1016 1017 case RTFS_TYPE_SYMLINK: 1018 rc = RTSymlinkCreate(szDst, szTarget, RTSYMLINKTYPE_UNKNOWN, 0); 1019 if (RT_FAILURE(rc)) 1020 return RTMsgErrorExit(RTEXITCODE_FAILURE, "%s: Error creating symbolic link: %Rrc", szDst, rc); 1021 break; 1022 1023 case RTFS_TYPE_FIFO: 1024 return RTMsgErrorExit(RTEXITCODE_FAILURE, "%s: FIFOs are not supported.", pszName); 1025 case RTFS_TYPE_DEV_CHAR: 1026 return RTMsgErrorExit(RTEXITCODE_FAILURE, "%s: FIFOs are not supported.", pszName); 1027 case RTFS_TYPE_DEV_BLOCK: 1028 return RTMsgErrorExit(RTEXITCODE_FAILURE, "%s: Block devices are not supported.", pszName); 1029 case RTFS_TYPE_SOCKET: 1030 return RTMsgErrorExit(RTEXITCODE_FAILURE, "%s: Sockets are not supported.", pszName); 1031 case RTFS_TYPE_WHITEOUT: 1032 return RTMsgErrorExit(RTEXITCODE_FAILURE, "%s: Whiteouts are not support.", pszName); 1033 default: 1034 return RTMsgErrorExit(RTEXITCODE_FAILURE, "%s: Unknown file type.", pszName); 1035 } 1115 if (!fIsHardLink) 1116 switch (UnixInfo.Attr.fMode & RTFS_TYPE_MASK) 1117 { 1118 case RTFS_TYPE_FILE: 1119 return rtZipTarCmdExtractFile(pOpts, hVfsObj, rcExit, szDst, &UnixInfo, &Owner, &Group); 1120 1121 case RTFS_TYPE_DIRECTORY: 1122 rc = RTDirCreateFullPath(szDst, UnixInfo.Attr.fMode & RTFS_UNIX_ALL_ACCESS_PERMS); 1123 if (RT_FAILURE(rc)) 1124 return RTMsgErrorExitFailure("%s: Error creating directory: %Rrc", szDst, rc); 1125 break; 1126 1127 case RTFS_TYPE_SYMLINK: 1128 rc = RTSymlinkCreate(szDst, szTarget, RTSYMLINKTYPE_UNKNOWN, 0); 1129 if (RT_FAILURE(rc)) 1130 return RTMsgErrorExitFailure("%s: Error creating symbolic link: %Rrc", szDst, rc); 1131 break; 1132 1133 case RTFS_TYPE_FIFO: 1134 return RTMsgErrorExitFailure("%s: FIFOs are not supported.", pszName); 1135 case RTFS_TYPE_DEV_CHAR: 1136 return RTMsgErrorExitFailure("%s: FIFOs are not supported.", pszName); 1137 case RTFS_TYPE_DEV_BLOCK: 1138 return RTMsgErrorExitFailure("%s: Block devices are not supported.", pszName); 1139 case RTFS_TYPE_SOCKET: 1140 return RTMsgErrorExitFailure("%s: Sockets are not supported.", pszName); 1141 case RTFS_TYPE_WHITEOUT: 1142 return RTMsgErrorExitFailure("%s: Whiteouts are not support.", pszName); 1143 default: 1144 return RTMsgErrorExitFailure("%s: Unknown file type.", pszName); 1145 } 1146 else 1147 return rtZipTarCmdExtractHardlink(pOpts, rcExit, szDst, szTarget, &UnixInfo, &Owner, &Group); 1036 1148 1037 1149 /* … … 1044 1156 rc = RTPathSetTimesEx(szDst, NULL, &UnixInfo.ModificationTime, NULL, NULL, RTPATH_F_ON_LINK); 1045 1157 if (RT_FAILURE(rc) && rc != VERR_NOT_SUPPORTED && rc != VERR_NS_SYMLINK_SET_TIME) 1046 rcExit = RTMsgErrorExit (RTEXITCODE_FAILURE,"%s: Error changing modification time: %Rrc.", pszName, rc);1158 rcExit = RTMsgErrorExitFailure("%s: Error changing modification time: %Rrc.", pszName, rc); 1047 1159 } 1048 1160 … … 1062 1174 rc = RTPathSetOwnerEx(szDst, uidFile, gidFile, RTPATH_F_ON_LINK); 1063 1175 if (RT_FAILURE(rc)) 1064 rcExit = RTMsgErrorExit (RTEXITCODE_FAILURE,"%s: Error owner/group: %Rrc", szDst, rc);1176 rcExit = RTMsgErrorExitFailure("%s: Error owner/group: %Rrc", szDst, rc); 1065 1177 } 1066 1178 } … … 1077 1189 rc = RTPathSetMode(szDst, fMode); 1078 1190 if (RT_FAILURE(rc)) 1079 rcExit = RTMsgErrorExit (RTEXITCODE_FAILURE,"%s: Error changing mode: %Rrc", szDst, rc);1191 rcExit = RTMsgErrorExitFailure("%s: Error changing mode: %Rrc", szDst, rc); 1080 1192 } 1081 1193 #endif … … 1106 1218 if (RT_FAILURE(rc)) 1107 1219 { 1108 rcExit = RTMsgErrorExit (RTEXITCODE_FAILURE,"RTVfsObjQueryInfo returned %Rrc on '%s'", rc, pszName);1220 rcExit = RTMsgErrorExitFailure("RTVfsObjQueryInfo returned %Rrc on '%s'", rc, pszName); 1109 1221 RT_ZERO(UnixInfo); 1110 1222 } … … 1138 1250 rc = RTVfsSymlinkRead(hVfsSymlink, szTarget, sizeof(szTarget)); 1139 1251 if (RT_FAILURE(rc)) 1140 rcExit = RTMsgErrorExit (RTEXITCODE_FAILURE,"RTVfsSymlinkRead returned %Rrc on '%s'", rc, pszName);1252 rcExit = RTMsgErrorExitFailure("RTVfsSymlinkRead returned %Rrc on '%s'", rc, pszName); 1141 1253 RTVfsSymlinkRelease(hVfsSymlink); 1142 1254 pszLinkType = RTFS_IS_SYMLINK(UnixInfo.Attr.fMode) ? "->" : "link to"; 1143 1255 } 1144 1256 else if (RTFS_IS_SYMLINK(UnixInfo.Attr.fMode)) 1145 rcExit = RTMsgErrorExit (RTEXITCODE_FAILURE,"Failed to get symlink object for '%s'", pszName);1257 rcExit = RTMsgErrorExitFailure("Failed to get symlink object for '%s'", pszName); 1146 1258 1147 1259 /* … … 1408 1520 RTGETOPTINIT_FLAGS_OPTS_FIRST); 1409 1521 if (RT_FAILURE(rc)) 1410 return RTMsgErrorExit (RTEXITCODE_FAILURE,"RTGetOpt failed: %Rrc", rc);1522 return RTMsgErrorExitFailure("RTGetOpt failed: %Rrc", rc); 1411 1523 1412 1524 RTZIPTARCMDOPS Opts; … … 1619 1731 if ( Opts.iOperation == 'x' 1620 1732 && Opts.pszOwner) 1621 return RTMsgErrorExit (RTEXITCODE_FAILURE,"The use of --owner with %s has not implemented yet", Opts.pszOperation);1733 return RTMsgErrorExitFailure("The use of --owner with %s has not implemented yet", Opts.pszOperation); 1622 1734 1623 1735 if ( Opts.iOperation == 'x' 1624 1736 && Opts.pszGroup) 1625 return RTMsgErrorExit (RTEXITCODE_FAILURE,"The use of --group with %s has not implemented yet", Opts.pszOperation);1737 return RTMsgErrorExitFailure("The use of --group with %s has not implemented yet", Opts.pszOperation); 1626 1738 1627 1739 /* … … 1644 1756 case 'u': 1645 1757 case RTZIPTARCMD_OPT_DELETE: 1646 return RTMsgErrorExit (RTEXITCODE_FAILURE,"The operation %s is not implemented yet", Opts.pszOperation);1758 return RTMsgErrorExitFailure("The operation %s is not implemented yet", Opts.pszOperation); 1647 1759 1648 1760 default: 1649 return RTMsgErrorExit (RTEXITCODE_FAILURE,"Internal error");1761 return RTMsgErrorExitFailure("Internal error"); 1650 1762 } 1651 1763 }
Note:
See TracChangeset
for help on using the changeset viewer.