VirtualBox

Changeset 2857 in kBuild for trunk/src/lib/nt/kFsCache.c


Ignore:
Timestamp:
Sep 1, 2016 3:39:51 AM (9 years ago)
Author:
bird
Message:

updates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/nt/kFsCache.c

    r2856 r2857  
    494494    {
    495495        if (pchDot[1] != '.')
    496             pchDot = (const char *)kHlpMemChr(pchDot + 1, '.', &pszPath[cchPath] - pchDot - 1);
     496        {
     497            pchDot++;
     498            pchDot = (const char *)kHlpMemChr(pchDot, '.', &pszPath[cchPath] - pchDot);
     499        }
    497500        else
    498501        {
    499502            char ch;
    500             if (   (ch = pchDot[2]) == '\0'
     503            if (   (ch = pchDot[2]) != '\0'
    501504                && IS_SLASH(ch))
    502505            {
     
    529532    {
    530533        if (pwcDot[1] != '.')
    531             pwcDot = wmemchr(pwcDot + 1, '.', &pwszPath[cwcPath] - pwcDot - 1);
     534        {
     535            pwcDot++;
     536            pwcDot = wmemchr(pwcDot, '.', &pwszPath[cwcPath] - pwcDot);
     537        }
    532538        else
    533539        {
    534540            wchar_t wch;
    535             if (   (wch = pwcDot[2]) == '\0'
     541            if (   (wch = pwcDot[2]) != '\0'
    536542                && IS_SLASH(wch))
    537543            {
     
    11551161    *penmError = KFSLOOKUPERROR_DIR_READ_ERROR;
    11561162    return K_TRUE;
     1163}
     1164
     1165
     1166/**
     1167 * Does the initial directory populating or refreshes it if it has been
     1168 * invalidated.
     1169 *
     1170 * This assumes the parent directory is opened.
     1171 *
     1172 * @returns K_TRUE on success, K_FALSE on error.
     1173 * @param   pCache              The cache.
     1174 * @param   pDir                The directory.
     1175 * @param   penmError           Where to store K_FALSE explanation.  Optional.
     1176 */
     1177KBOOL kFsCacheDirEnsurePopuplated(PKFSCACHE pCache, PKFSDIR pDir, KFSLOOKUPERROR *penmError)
     1178{
     1179    KFSLOOKUPERROR enmIgnored;
     1180    if (   pDir->fPopulated
     1181        && (   pDir->Obj.uCacheGen == KFSOBJ_CACHE_GEN_IGNORE
     1182            || pDir->Obj.uCacheGen == pCache->uGeneration) )
     1183        return K_TRUE;
     1184    return kFsCachePopuplateOrRefreshDir(pCache, pDir, penmError ? penmError : &enmIgnored);
    11571185}
    11581186
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette