Changeset 1674
- Timestamp:
- Dec 1, 2004, 2:37:40 AM (21 years ago)
- Location:
- trunk/src/emx
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/emx/include/direct.h
-
Property cvs2svn:cvs-rev
changed from
1.2
to1.3
r1673 r1674 55 55 int rmdir (const char *); 56 56 57 int _chdrive( char);57 int _chdrive(int); 58 58 char * _getdcwd(int, char *, int); 59 char_getdrive(void);59 int _getdrive(void); 60 60 61 61 /* Special LIBC addition. */ -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/include/stdlib.h
-
Property cvs2svn:cvs-rev
changed from
1.27
to1.28
r1673 r1674 420 420 long double _atofl (__const__ char *); 421 421 int _chdir2 (__const__ char *); 422 int _chdrive ( char);422 int _chdrive (int); 423 423 int _core (int); 424 424 void _defext (char *, __const__ char *); … … 438 438 int _getcwd1 (char *, char); 439 439 char *_getcwd2 (char *, int); 440 char_getdrive (void);440 int _getdrive (void); 441 441 char *_getext (__const__ char *); 442 442 char *_getext2 (__const__ char *); -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/misc/_chdrive.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r1673 r1674 1 /* sys/chdrive.c (emx+gcc) -- Copyright (c) 1992-1996 by Eberhard Mattes */ 1 /* $Id$ */ 2 /** @file 3 * 4 * _chdrive. 5 * 6 * Copyright (c) 2004 knut st. osmundsen <bird@innotek.de> 7 * 8 * 9 * This file is part of InnoTek LIBC. 10 * 11 * InnoTek LIBC is free software; you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License as published 13 * by the Free Software Foundation; either version 2 of the License, or 14 * (at your option) any later version. 15 * 16 * InnoTek LIBC is distributed in the hope that it will be useful, 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 * GNU Lesser General Public License for more details. 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * along with InnoTek LIBC; if not, write to the Free Software 23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 24 * 25 */ 2 26 27 /******************************************************************************* 28 * Header Files * 29 *******************************************************************************/ 3 30 #include "libc-alias.h" 4 31 #include <direct.h> 32 #include <stdlib.h> 33 #include <errno.h> 5 34 #include <InnoTekLIBC/backend.h> 35 #define __LIBC_LOG_GROUP __LIBC_LOG_GRP_MISC 36 #include <InnoTekLIBC/logstrict.h> 6 37 7 int _chdrive (char drive) 38 /** 39 * Gets the current default drive. 40 * 41 * @returns Current default drive as an uppercased letter. 42 * @returns -1 and errno on failure. 43 * @param chDrive The new drive letter. 44 */ 45 int _chdrive(int chDrive) 8 46 { 9 __libc_Back_fsDriveDefaultSet(drive); 10 /* for some reason this function doesn't return errors. */ 11 return 0; 47 LIBCLOG_ENTER("chDrive=%d (%c)\n", chDrive, chDrive); 48 int rc = __libc_Back_fsDriveDefaultSet(chDrive); 49 if (!rc) 50 LIBCLOG_RETURN_INT(0); 51 errno = -rc; 52 LIBCLOG_RETURN_INT(-1); 12 53 } 54 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/misc/_getdrive.c
-
Property cvs2svn:cvs-rev
changed from
1.2
to1.3
r1673 r1674 1 /* sys/getdrive.c (emx+gcc) -- Copyright (c) 1992-1996 by Eberhard Mattes */ 1 /* $Id$ */ 2 /** @file 3 * 4 * _getdrive. 5 * 6 * Copyright (c) 2004 knut st. osmundsen <bird@innotek.de> 7 * 8 * 9 * This file is part of InnoTek LIBC. 10 * 11 * InnoTek LIBC is free software; you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License as published 13 * by the Free Software Foundation; either version 2 of the License, or 14 * (at your option) any later version. 15 * 16 * InnoTek LIBC is distributed in the hope that it will be useful, 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 * GNU Lesser General Public License for more details. 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * along with InnoTek LIBC; if not, write to the Free Software 23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 24 * 25 */ 2 26 27 /******************************************************************************* 28 * Header Files * 29 *******************************************************************************/ 3 30 #include "libc-alias.h" 4 31 #include <direct.h> 32 #include <stdlib.h> 5 33 #include <errno.h> 6 34 #include <InnoTekLIBC/backend.h> 35 #define __LIBC_LOG_GROUP __LIBC_LOG_GRP_MISC 36 #include <InnoTekLIBC/logstrict.h> 7 37 8 char _getdrive (void) 38 /** 39 * Gets the current default drive. 40 * 41 * @returns Current default drive as an uppercased letter. 42 * @returns -1 and errno on failure. 43 */ 44 int _getdrive(void) 9 45 { 46 LIBCLOG_ENTER("\n"); 10 47 char chDrive; 11 48 int rc = __libc_Back_fsDriveDefaultGet(&chDrive); 12 49 if (!rc) 13 return chDrive - 'A' + 1; 14 50 LIBCLOG_RETURN_MSG(chDrive, "ret %d (%c)\n", chDrive, chDrive); 15 51 errno = -rc; 16 return 0;52 LIBCLOG_RETURN_INT(-1); 17 53 } -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/sys/b_fs.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r1673 r1674 118 118 * @{ */ 119 119 /** Resolves the path up to but not including the last component. */ 120 #define BACKFS_FLAGS_RESOLVE_PARENT 0x1120 #define BACKFS_FLAGS_RESOLVE_PARENT 0 121 121 /** Resolves and verfies the entire path. */ 122 #define BACKFS_FLAGS_RESOLVE_FULL 0x2122 #define BACKFS_FLAGS_RESOLVE_FULL 1 123 123 /** Resolves and verfies the entire path but it's ok if the last component doesn't exist. */ 124 #define BACKFS_FLAGS_RESOLVE_FULL_MAYBE 0x3 124 #define BACKFS_FLAGS_RESOLVE_FULL_MAYBE (BACKFS_FLAGS_RESOLVE_FULL | BACKFS_FLAGS_RESOLVE_FULL_MAYBE_) 125 /** Internal, use BACKFS_FLAGS_RESOLVE_FULL_MAYBE. */ 126 #define BACKFS_FLAGS_RESOLVE_FULL_MAYBE_ 2 127 /** The specified path is a directory. */ 128 #define BACKFS_FLAGS_RESOLVE_DIR 4 129 /** The specified path maybe a directory. */ 130 #define BACKFS_FLAGS_RESOLVE_DIR_MAYBE (BACKFS_FLAGS_RESOLVE_DIR | BACKFS_FLAGS_RESOLVE_DIR_MAYBE_) 131 /** Internal, use BACKFS_FLAGS_RESOLVE_DIR_MAYBE. */ 132 #define BACKFS_FLAGS_RESOLVE_DIR_MAYBE_ 8 125 133 /** @} */ 126 134 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/sys/b_fsDirChangeRoot.c
-
Property cvs2svn:cvs-rev
changed from
1.2
to1.3
r1673 r1674 61 61 */ 62 62 char szNativePath[PATH_MAX]; 63 rc = __libc_back_fsResolve(pszNewRoot, BACKFS_FLAGS_RESOLVE_FULL , &szNativePath[0], NULL);63 rc = __libc_back_fsResolve(pszNewRoot, BACKFS_FLAGS_RESOLVE_FULL | BACKFS_FLAGS_RESOLVE_DIR, &szNativePath[0], NULL); 64 64 if (!rc) 65 65 { -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/sys/b_fsDirCreate.c
-
Property cvs2svn:cvs-rev
changed from
1.3
to1.4
r1673 r1674 59 59 */ 60 60 char szNativePath[PATH_MAX]; 61 int rc = __libc_back_fsResolve(pszPath, BACKFS_FLAGS_RESOLVE_PARENT , &szNativePath[0], NULL);61 int rc = __libc_back_fsResolve(pszPath, BACKFS_FLAGS_RESOLVE_PARENT | BACKFS_FLAGS_RESOLVE_DIR, &szNativePath[0], NULL); 62 62 if (rc) 63 63 LIBCLOG_RETURN_INT(rc); -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/sys/b_fsDirCurrentSet.c
-
Property cvs2svn:cvs-rev
changed from
1.2
to1.3
r1673 r1674 62 62 int fInUnixTree; 63 63 char szNativePath[PATH_MAX]; 64 rc = __libc_back_fsResolve(pszPath, BACKFS_FLAGS_RESOLVE_FULL , &szNativePath[0], &fInUnixTree);64 rc = __libc_back_fsResolve(pszPath, BACKFS_FLAGS_RESOLVE_FULL | BACKFS_FLAGS_RESOLVE_DIR, &szNativePath[0], &fInUnixTree); 65 65 if (!rc) 66 66 { -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/sys/b_fsDirRemove.c
-
Property cvs2svn:cvs-rev
changed from
1.2
to1.3
r1673 r1674 56 56 */ 57 57 char szNativePath[PATH_MAX]; 58 int rc = __libc_back_fsResolve(pszPath, BACKFS_FLAGS_RESOLVE_FULL , &szNativePath[0], NULL);58 int rc = __libc_back_fsResolve(pszPath, BACKFS_FLAGS_RESOLVE_FULL | BACKFS_FLAGS_RESOLVE_DIR, &szNativePath[0], NULL); 59 59 if (rc) 60 60 LIBCLOG_RETURN_INT(rc); -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/sys/b_fsSymlinkCreate.c
-
Property cvs2svn:cvs-rev
changed from
1.2
to1.3
r1673 r1674 54 54 */ 55 55 char szNativePath[PATH_MAX]; 56 int rc = __libc_back_fsResolve(pszSymlink, BACKFS_FLAGS_RESOLVE_PARENT , &szNativePath[0], NULL);56 int rc = __libc_back_fsResolve(pszSymlink, BACKFS_FLAGS_RESOLVE_PARENT | BACKFS_FLAGS_RESOLVE_DIR_MAYBE, &szNativePath[0], NULL); 57 57 if (!rc) 58 58 rc = __libc_back_fsNativeSymlinkCreate(pszTarget, &szNativePath[0]); -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/sys/fs.c
-
Property cvs2svn:cvs-rev
changed from
1.7
to1.8
r1673 r1674 593 593 * @returns Number of bytes in the clean path. 594 594 * @param pszPath The path to cleanup. 595 * @parm fFlags Flags controlling the operation of the function. 596 * See the BACKFS_FLAGS_* defines. 595 597 */ 596 static int fsCleanPath(char *pszPath )598 static int fsCleanPath(char *pszPath, int fFlags) 597 599 { 598 600 /* … … 633 635 634 636 /* 635 * Remove trailing slash .637 * Remove trailing slash if the path may be pointing to a directory. 636 638 */ 637 639 int cch = pszTrg - pszPath; 638 if (cch > 1 && pszTrg[-1] == '/' && pszTrg[-2] != ':' && pszTrg[-2] != '/') 640 if ( (fFlags & BACKFS_FLAGS_RESOLVE_DIR) 641 && cch > 1 642 && pszTrg[-1] == '/' 643 && pszTrg[-2] != ':' 644 && pszTrg[-2] != '/') 639 645 pszPath[--cch] = '\0'; 640 646 … … 720 726 unsigned cLoopsLeft = 8; 721 727 int fInUnixTree = __libc_gfInUnixTree; 722 int rcRet = -ENAMETOOLONG;728 int rcRet = 0; 723 729 HDIR hDir = HDIR_CREATE; 724 730 FS_VAR() 725 731 FS_SAVE_LOAD(); 726 while (cLoopsLeft-- > 0)732 for (;;) 727 733 { 728 734 /* … … 791 797 int cchUserPath = strlen(pszUserPath) + 1; 792 798 if (cch + cchUserPath > PATH_MAX) 799 { 800 rcRet = -ENAMETOOLONG; 793 801 break; 802 } 794 803 memcpy(&szTmp[cch], pszUserPath, cchUserPath); 795 804 pszUserPath = memcpy(pachBuffer, szTmp, cch + cchUserPath); … … 823 832 /* 824 833 * Redetermin root because of rewrite. 825 * Assume qualified path from rewrite!826 834 */ 827 835 iRoot = szTmp[1] == ':' ? 2 : 1; … … 831 839 cchTmp = strlen(pszUserPath); 832 840 if (cchTmp + 2 > sizeof(szTmp)) 841 { 842 rcRet = -ENAMETOOLONG; 833 843 break; 844 } 834 845 memcpy(szTmp, pszUserPath, cchTmp + 1); 835 846 } … … 870 881 { 871 882 memcpy(szTmp, pszUserPath, cchTmp + 1); 872 fsCleanPath(&szTmp[0] );883 fsCleanPath(&szTmp[0], fFlags); 873 884 rcRet = 0; 874 885 } 886 else 887 rcRet = -ENAMETOOLONG; 875 888 break; 876 889 } … … 880 893 * Remove excessive slashing and convert all slashes to '/'. 881 894 */ 882 cchTmp = fsCleanPath(&szTmp[0] );895 cchTmp = fsCleanPath(&szTmp[0], fFlags); 883 896 884 897 /* … … 889 902 iRoot = __libc_gcchUnixRoot; 890 903 if (cchTmp + iRoot >= PATH_MAX) 904 { 905 rcRet = -ENAMETOOLONG; 891 906 break; 907 } 892 908 memcpy(pachBuffer, szTmp, cchTmp + 1); 893 909 memcpy(szTmp, __libc_gszUnixRoot, iRoot); … … 939 955 /* If only one component, we'll check if the fVerifyLast was requested. */ 940 956 if ( !psz 941 && (fFlags == BACKFS_FLAGS_RESOLVE_FULL || fFlags == BACKFS_FLAGS_RESOLVE_FULL_MAYBE)) 957 && (fFlags & BACKFS_FLAGS_RESOLVE_FULL) 958 && *pszPrev) 942 959 psz = strchr(szTmp, '\0'); 943 960 … … 974 991 if (!chSlash) 975 992 { 976 rcRet = -0;993 rcRet = 0; 977 994 break; 978 995 } … … 980 997 while (*psz != '/') 981 998 { 982 if (!*psz) 999 if (*psz) 1000 psz++; 1001 else 983 1002 { 984 if ( fFlags != BACKFS_FLAGS_RESOLVE_FULL 985 && fFlags != BACKFS_FLAGS_RESOLVE_FULL_MAYBE) 1003 if (!(fFlags & BACKFS_FLAGS_RESOLVE_FULL)) 986 1004 { 987 rcRet = -0;1005 rcRet = 0; 988 1006 psz = NULL; 989 1007 } 990 1008 break; 991 1009 } 992 psz++;993 1010 } 994 1011 continue; … … 1016 1033 { 1017 1034 LIBCLOG_MSG("DosFindFirst('%s',,,,,) -> %d resolving '%s'\n", szTmp, rc, pszUserPathIn); 1018 if ( fFlags == BACKFS_FLAGS_RESOLVE_FULL_MAYBE&& !chSlash)1035 if ((fFlags & BACKFS_FLAGS_RESOLVE_FULL_MAYBE_) && !chSlash) 1019 1036 rcRet = 0; 1020 1037 else … … 1046 1063 { 1047 1064 LIBCLOG_MSG("DosQueryPathInfo('%s',,,) -> %d resolving '%s'\n", szTmp, rc, pszUserPathIn); 1048 if ( fFlags == BACKFS_FLAGS_RESOLVE_FULL_MAYBE&& !chSlash)1065 if ((fFlags & BACKFS_FLAGS_RESOLVE_FULL_MAYBE_) && !chSlash) 1049 1066 rcRet = 0; 1050 1067 else … … 1073 1090 } 1074 1091 1092 /* Check if we've reached the max number of symlink loops before we continue. */ 1093 if (cLoopsLeft-- <= 0) 1094 { 1095 rcRet = -ELOOP; 1096 break; 1097 } 1098 1075 1099 /* Cleanup the symlink and find it's length. */ 1076 1100 pszSymlink[pusType[1]] = '\0'; 1077 int cchSymlink = fsCleanPath(pszSymlink );1101 int cchSymlink = fsCleanPath(pszSymlink, fFlags); 1078 1102 1079 1103 /* Merge symlink with the path. */ … … 1085 1109 */ 1086 1110 if (cchSymlink + cchLeft + 2 >= PATH_MAX) 1111 { 1112 rcRet = -ENAMETOOLONG; 1087 1113 break; 1114 } 1088 1115 if (cchLeft) 1089 1116 { … … 1104 1131 */ 1105 1132 if (cchSymlink + cchTmp + 2 >= PATH_MAX) 1133 { 1134 rcRet = -ENAMETOOLONG; 1106 1135 break; 1136 } 1107 1137 if (cchLeft) 1108 1138 { … … 1116 1146 while (*psz != '/') 1117 1147 { 1118 if (!*psz) 1148 if (*psz) 1149 psz++; 1150 else 1119 1151 { 1120 if ( fFlags != BACKFS_FLAGS_RESOLVE_FULL 1121 && fFlags != BACKFS_FLAGS_RESOLVE_FULL_MAYBE) 1152 if (!(fFlags & BACKFS_FLAGS_RESOLVE_FULL)) 1122 1153 { 1123 1154 rcRet = 0; … … 1126 1157 break; 1127 1158 } 1128 psz++;1129 1159 } 1130 1160 continue; … … 1158 1188 if (!*psz) 1159 1189 { 1160 if ( fFlags != BACKFS_FLAGS_RESOLVE_FULL 1161 && fFlags != BACKFS_FLAGS_RESOLVE_FULL_MAYBE) 1190 if (!(fFlags & BACKFS_FLAGS_RESOLVE_FULL)) 1162 1191 { 1163 1192 rcRet = 0; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/testcase/libc/miscinnotek/fsinternals.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r1673 r1674 2 2 #include <string.h> 3 3 #include <errno.h> 4 5 int __libc_back_fsResolve(const char *pszUserPath, unsigned fFlags, char *pszNativePath, int *pfInUnixTree); 6 7 /** __libc_back_fsResolve() flags. 8 * @{ */ 9 /** Resolves the path up to but not including the last component. */ 10 #define BACKFS_FLAGS_RESOLVE_PARENT 0x1 11 /** Resolves and verfies the entire path. */ 12 #define BACKFS_FLAGS_RESOLVE_FULL 0x2 13 /** Resolves and verfies the entire path but it's ok if the last component doesn't exist. */ 14 #define BACKFS_FLAGS_RESOLVE_FULL_MAYBE 0x3 15 /** @} */ 4 #include "../../../src/lib/sys/b_fs.h" 16 5 17 6 18 int main (int argc, char *argv[]) 7 /** 8 * Do one call, check and report the result. 9 */ 10 static int testit(const char *pszPath, unsigned fFlags, int rcCorrect) 19 11 { 20 12 char szNativePath[300]; … … 22 14 23 15 memset(szNativePath, 0xAA, sizeof(szNativePath)); 16 szNativePath[sizeof(szNativePath) - 1] = '\0'; 24 17 errno = 0; 25 rc = __libc_back_fsResolve(".", BACKFS_FLAGS_RESOLVE_FULL, szNativePath, NULL); 26 printf("+ '.' -> rc=%d errno=%d szNativePath=%s\n", rc, errno, szNativePath); 18 rc = __libc_back_fsResolve(pszPath, fFlags, szNativePath, NULL); 19 if (errno != 0) 20 printf("FAILURE: flags=%#02x path='%s' -> rc=%d errno=%d szNativePath='%s' ERRNO CHANGED!\n", fFlags, pszPath, rc, errno, szNativePath); 21 else if (!rcCorrect) 22 { 23 /* 24 * Positive test. 25 */ 26 if (!rc) 27 { 28 if (!strchr(szNativePath, 0xAA)) 29 { 30 printf("SUCCESS: flags=%#02x path='%s' -> szNativePath='%s'\n", fFlags, pszPath, szNativePath); 31 return 0; 32 } 33 else 34 printf("FAILURE: flags=%#02x path='%s' -> rc=%d szNativePath='%s' PADDING!\n", fFlags, pszPath, rc, szNativePath); 35 } 36 else 37 printf("FAILURE: flags=%#02x path='%s' -> rc=%d szNativePath='%s' (failed)\n", fFlags, pszPath, rc, szNativePath); 38 } 39 else 40 { 41 /* 42 * Negative test. 43 */ 44 if (rc == rcCorrect) 45 { 46 printf("SUCCESS: flags=%#02x path='%s' -> rc=%d (negative)\n", fFlags, pszPath, rc); 47 return 0; 48 } 49 else 50 printf("FAILURE: flags=%#02x path='%s' -> rc=%d not %d! (negative)\n", fFlags, pszPath, rc, rcCorrect); 51 } 52 return 1; 53 } 27 54 28 memset(szNativePath, 0xAA, sizeof(szNativePath));29 errno = 0;30 rc = __libc_back_fsResolve("/", BACKFS_FLAGS_RESOLVE_FULL, szNativePath, NULL);31 printf("+ '/' -> rc=%d errno=%d szNativePath=%s\n", rc, errno, szNativePath);32 55 33 memset(szNativePath, 0xAA, sizeof(szNativePath)); 34 errno = 0; 35 rc = __libc_back_fsResolve("/tmp", BACKFS_FLAGS_RESOLVE_FULL, szNativePath, NULL); 36 printf("+ '/tmp' -> rc=%d errno=%d szNativePath=%s\n", rc, errno, szNativePath); 56 int main (int argc, char *argv[]) 57 { 58 int rcRet = 0; 37 59 38 memset(szNativePath, 0xAA, sizeof(szNativePath));39 errno = 0;40 rc = __libc_back_fsResolve("/tmp", BACKFS_FLAGS_RESOLVE_PARENT, szNativePath, NULL);41 printf("+ '/tmp' (parent) -> rc=%d errno=%d szNativePath=%s\n", rc, errno, szNativePath);42 60 43 memset(szNativePath, 0xAA, sizeof(szNativePath)); 44 errno = 0; 45 rc = __libc_back_fsResolve("/nosuchdir", BACKFS_FLAGS_RESOLVE_PARENT, szNativePath, NULL); 46 printf("+ '/nosuchdir' (parent) -> rc=%d errno=%d szNativePath=%s\n", rc, errno, szNativePath); 47 48 memset(szNativePath, 0xAA, sizeof(szNativePath)); 49 errno = 0; 50 rc = __libc_back_fsResolve("/nosuchdir/nosuchsubdir", BACKFS_FLAGS_RESOLVE_PARENT, szNativePath, NULL); 51 printf("- '/nosuchdir/nosuchsubdir' (parent) -> rc=%d errno=%d szNativePath=%s\n", rc, errno, szNativePath); 52 61 rcRet += testit(".", BACKFS_FLAGS_RESOLVE_FULL, 0); 62 rcRet += testit("/", BACKFS_FLAGS_RESOLVE_FULL, 0); 63 rcRet += testit("/tmp", BACKFS_FLAGS_RESOLVE_FULL, 0); 64 rcRet += testit("/tmp/", BACKFS_FLAGS_RESOLVE_FULL, -ENOENT); 65 rcRet += testit("/tmp/", BACKFS_FLAGS_RESOLVE_FULL | BACKFS_FLAGS_RESOLVE_DIR, 0); 66 rcRet += testit("/tmp", BACKFS_FLAGS_RESOLVE_PARENT, 0); 67 rcRet += testit("/tmp/", BACKFS_FLAGS_RESOLVE_PARENT, -ENOENT); 68 rcRet += testit("/tmp/", BACKFS_FLAGS_RESOLVE_PARENT | BACKFS_FLAGS_RESOLVE_DIR, 0); 69 rcRet += testit("/tmp/NoSuchSubDir", BACKFS_FLAGS_RESOLVE_PARENT, 0); 70 rcRet += testit("/tmp/NoSuchSubDir/", BACKFS_FLAGS_RESOLVE_PARENT, -ENOENT); 71 rcRet += testit("/tmp/NoSuchSubDir/", BACKFS_FLAGS_RESOLVE_PARENT | BACKFS_FLAGS_RESOLVE_DIR, 0); 72 rcRet += testit("/nosuchdir", BACKFS_FLAGS_RESOLVE_PARENT, 0); 73 rcRet += testit("/nosuchdir/nosuchsubdir", BACKFS_FLAGS_RESOLVE_PARENT, -ENOENT); 53 74 54 75 return 0; -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.