Changeset 1674


Ignore:
Timestamp:
Dec 1, 2004, 2:37:40 AM (21 years ago)
Author:
bird
Message:

Bugfixing LIBC 0.6 beta1.

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 to 1.3
    r1673 r1674  
    5555int rmdir (const char *);
    5656
    57 int _chdrive(char);
     57int _chdrive(int);
    5858char * _getdcwd(int, char *, int);
    59 char _getdrive(void);
     59int _getdrive(void);
    6060
    6161/* Special LIBC addition. */
  • trunk/src/emx/include/stdlib.h

    • Property cvs2svn:cvs-rev changed from 1.27 to 1.28
    r1673 r1674  
    420420long double _atofl (__const__ char *);
    421421int _chdir2 (__const__ char *);
    422 int _chdrive (char);
     422int _chdrive (int);
    423423int _core (int);
    424424void _defext (char *, __const__ char *);
     
    438438int _getcwd1 (char *, char);
    439439char *_getcwd2 (char *, int);
    440 char _getdrive (void);
     440int _getdrive (void);
    441441char *_getext (__const__ char *);
    442442char *_getext2 (__const__ char *);
  • trunk/src/emx/src/lib/misc/_chdrive.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.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 */
    226
     27/*******************************************************************************
     28*   Header Files                                                               *
     29*******************************************************************************/
    330#include "libc-alias.h"
    431#include <direct.h>
     32#include <stdlib.h>
     33#include <errno.h>
    534#include <InnoTekLIBC/backend.h>
     35#define __LIBC_LOG_GROUP __LIBC_LOG_GRP_MISC
     36#include <InnoTekLIBC/logstrict.h>
    637
    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 */
     45int _chdrive(int chDrive)
    846{
    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);
    1253}
     54
  • trunk/src/emx/src/lib/misc/_getdrive.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.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 */
    226
     27/*******************************************************************************
     28*   Header Files                                                               *
     29*******************************************************************************/
    330#include "libc-alias.h"
    431#include <direct.h>
     32#include <stdlib.h>
    533#include <errno.h>
    634#include <InnoTekLIBC/backend.h>
     35#define __LIBC_LOG_GROUP __LIBC_LOG_GRP_MISC
     36#include <InnoTekLIBC/logstrict.h>
    737
    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 */
     44int _getdrive(void)
    945{
     46    LIBCLOG_ENTER("\n");
    1047    char chDrive;
    1148    int rc = __libc_Back_fsDriveDefaultGet(&chDrive);
    1249    if (!rc)
    13         return chDrive - 'A' + 1;
    14 
     50        LIBCLOG_RETURN_MSG(chDrive, "ret %d (%c)\n", chDrive, chDrive);
    1551    errno = -rc;
    16     return 0;
     52    LIBCLOG_RETURN_INT(-1);
    1753}
  • trunk/src/emx/src/lib/sys/b_fs.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r1673 r1674  
    118118 * @{ */
    119119/** Resolves the path up to but not including the last component. */
    120 #define BACKFS_FLAGS_RESOLVE_PARENT     0x1
     120#define BACKFS_FLAGS_RESOLVE_PARENT         0
    121121/** Resolves and verfies the entire path. */
    122 #define BACKFS_FLAGS_RESOLVE_FULL       0x2
     122#define BACKFS_FLAGS_RESOLVE_FULL           1
    123123/** 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
    125133/** @} */
    126134
  • trunk/src/emx/src/lib/sys/b_fsDirChangeRoot.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r1673 r1674  
    6161     */
    6262    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);
    6464    if (!rc)
    6565    {
  • trunk/src/emx/src/lib/sys/b_fsDirCreate.c

    • Property cvs2svn:cvs-rev changed from 1.3 to 1.4
    r1673 r1674  
    5959     */
    6060    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);
    6262    if (rc)
    6363        LIBCLOG_RETURN_INT(rc);
  • trunk/src/emx/src/lib/sys/b_fsDirCurrentSet.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r1673 r1674  
    6262    int     fInUnixTree;
    6363    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);
    6565    if (!rc)
    6666    {
  • trunk/src/emx/src/lib/sys/b_fsDirRemove.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r1673 r1674  
    5656     */
    5757    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);
    5959    if (rc)
    6060        LIBCLOG_RETURN_INT(rc);
  • trunk/src/emx/src/lib/sys/b_fsSymlinkCreate.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r1673 r1674  
    5454     */
    5555    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);
    5757    if (!rc)
    5858        rc = __libc_back_fsNativeSymlinkCreate(pszTarget, &szNativePath[0]);
  • trunk/src/emx/src/lib/sys/fs.c

    • Property cvs2svn:cvs-rev changed from 1.7 to 1.8
    r1673 r1674  
    593593 * @returns Number of bytes in the clean path.
    594594 * @param   pszPath     The path to cleanup.
     595 * @parm    fFlags          Flags controlling the operation of the function.
     596 *                          See the BACKFS_FLAGS_* defines.
    595597 */
    596 static int fsCleanPath(char *pszPath)
     598static int fsCleanPath(char *pszPath, int fFlags)
    597599{
    598600    /*
     
    633635
    634636    /*
    635      * Remove trailing slash.
     637     * Remove trailing slash if the path may be pointing to a directory.
    636638     */
    637639    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] != '/')
    639645        pszPath[--cch] = '\0';
    640646
     
    720726    unsigned    cLoopsLeft = 8;
    721727    int         fInUnixTree = __libc_gfInUnixTree;
    722     int         rcRet = -ENAMETOOLONG;
     728    int         rcRet = 0;
    723729    HDIR        hDir = HDIR_CREATE;
    724730    FS_VAR()
    725731    FS_SAVE_LOAD();
    726     while (cLoopsLeft-- > 0)
     732    for (;;)
    727733    {
    728734        /*
     
    791797            int cchUserPath = strlen(pszUserPath) + 1;
    792798            if (cch + cchUserPath > PATH_MAX)
     799            {
     800                rcRet = -ENAMETOOLONG;
    793801                break;
     802            }
    794803            memcpy(&szTmp[cch], pszUserPath, cchUserPath);
    795804            pszUserPath = memcpy(pachBuffer, szTmp, cch + cchUserPath);
     
    823832            /*
    824833             * Redetermin root because of rewrite.
    825              * Assume qualified path from rewrite!
    826834             */
    827835            iRoot = szTmp[1] == ':' ? 2 : 1;
     
    831839            cchTmp = strlen(pszUserPath);
    832840            if (cchTmp + 2 > sizeof(szTmp))
     841            {
     842                rcRet = -ENAMETOOLONG;
    833843                break;
     844            }
    834845            memcpy(szTmp, pszUserPath, cchTmp + 1);
    835846        }
     
    870881                {
    871882                    memcpy(szTmp, pszUserPath, cchTmp + 1);
    872                     fsCleanPath(&szTmp[0]);
     883                    fsCleanPath(&szTmp[0], fFlags);
    873884                    rcRet = 0;
    874885                }
     886                else
     887                    rcRet = -ENAMETOOLONG;
    875888                break;
    876889            }
     
    880893         * Remove excessive slashing and convert all slashes to '/'.
    881894         */
    882         cchTmp = fsCleanPath(&szTmp[0]);
     895        cchTmp = fsCleanPath(&szTmp[0], fFlags);
    883896
    884897        /*
     
    889902            iRoot = __libc_gcchUnixRoot;
    890903            if (cchTmp + iRoot >= PATH_MAX)
     904            {
     905                rcRet = -ENAMETOOLONG;
    891906                break;
     907            }
    892908            memcpy(pachBuffer, szTmp, cchTmp + 1);
    893909            memcpy(szTmp, __libc_gszUnixRoot, iRoot);
     
    939955        /* If only one component, we'll check if the fVerifyLast was requested. */
    940956        if (    !psz
    941             &&  (fFlags == BACKFS_FLAGS_RESOLVE_FULL || fFlags == BACKFS_FLAGS_RESOLVE_FULL_MAYBE))
     957            &&  (fFlags & BACKFS_FLAGS_RESOLVE_FULL)
     958            &&  *pszPrev)
    942959            psz = strchr(szTmp, '\0');
    943960
     
    974991                if (!chSlash)
    975992                {
    976                     rcRet = -0;
     993                    rcRet = 0;
    977994                    break;
    978995                }
     
    980997                while (*psz != '/')
    981998                {
    982                     if (!*psz)
     999                    if (*psz)
     1000                        psz++;
     1001                    else
    9831002                    {
    984                         if (    fFlags != BACKFS_FLAGS_RESOLVE_FULL
    985                             &&  fFlags != BACKFS_FLAGS_RESOLVE_FULL_MAYBE)
     1003                        if (!(fFlags & BACKFS_FLAGS_RESOLVE_FULL))
    9861004                        {
    987                             rcRet = -0;
     1005                            rcRet = 0;
    9881006                            psz = NULL;
    9891007                        }
    9901008                        break;
    9911009                    }
    992                     psz++;
    9931010                }
    9941011                continue;
     
    10161033            {
    10171034                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)
    10191036                    rcRet = 0;
    10201037                else
     
    10461063                {
    10471064                    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)
    10491066                        rcRet = 0;
    10501067                    else
     
    10731090                    }
    10741091
     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
    10751099                    /* Cleanup the symlink and find it's length. */
    10761100                    pszSymlink[pusType[1]] = '\0';
    1077                     int cchSymlink = fsCleanPath(pszSymlink);
     1101                    int cchSymlink = fsCleanPath(pszSymlink, fFlags);
    10781102
    10791103                    /* Merge symlink with the path. */
     
    10851109                         */
    10861110                        if (cchSymlink + cchLeft + 2 >= PATH_MAX)
     1111                        {
     1112                            rcRet = -ENAMETOOLONG;
    10871113                            break;
     1114                        }
    10881115                        if (cchLeft)
    10891116                        {
     
    11041131                         */
    11051132                        if (cchSymlink + cchTmp + 2 >= PATH_MAX)
     1133                        {
     1134                            rcRet = -ENAMETOOLONG;
    11061135                            break;
     1136                        }
    11071137                        if (cchLeft)
    11081138                        {
     
    11161146                        while (*psz != '/')
    11171147                        {
    1118                             if (!*psz)
     1148                            if (*psz)
     1149                                psz++;
     1150                            else
    11191151                            {
    1120                                 if (    fFlags != BACKFS_FLAGS_RESOLVE_FULL
    1121                                     &&  fFlags != BACKFS_FLAGS_RESOLVE_FULL_MAYBE)
     1152                                if (!(fFlags & BACKFS_FLAGS_RESOLVE_FULL))
    11221153                                {
    11231154                                    rcRet = 0;
     
    11261157                                break;
    11271158                            }
    1128                             psz++;
    11291159                        }
    11301160                        continue;
     
    11581188                if (!*psz)
    11591189                {
    1160                     if (    fFlags != BACKFS_FLAGS_RESOLVE_FULL
    1161                         &&  fFlags != BACKFS_FLAGS_RESOLVE_FULL_MAYBE)
     1190                    if (!(fFlags & BACKFS_FLAGS_RESOLVE_FULL))
    11621191                    {
    11631192                        rcRet = 0;
  • trunk/src/emx/testcase/libc/miscinnotek/fsinternals.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r1673 r1674  
    22#include <string.h>
    33#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"
    165
    176
    18 int main (int argc, char *argv[])
     7/**
     8 * Do one call, check and report the result.
     9 */
     10static int testit(const char *pszPath, unsigned fFlags, int rcCorrect)
    1911{
    2012    char    szNativePath[300];
     
    2214
    2315    memset(szNativePath, 0xAA, sizeof(szNativePath));
     16    szNativePath[sizeof(szNativePath) - 1] = '\0';
    2417    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}
    2754
    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);
    3255
    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);
     56int main (int argc, char *argv[])
     57{
     58    int     rcRet = 0;
    3759
    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);
    4260
    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);
    5374
    5475    return 0;
Note: See TracChangeset for help on using the changeset viewer.