VirtualBox

Changeset 2653 in kBuild for trunk


Ignore:
Timestamp:
Sep 9, 2012 6:02:54 PM (12 years ago)
Author:
bird
Message:

kash: fixed shfile_opendir on windows, and thereby argument expansion.

Location:
trunk/src/kash
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kash/eval.c

    r2424 r2653  
    706706        psh->back_exitstatus = 0;
    707707
     708        /** @todo r=bird: Why is arguments and envvars expanded in this
     709         * particular order?  It would be both faster and simpler to do the
     710         * envvars first and then continue with the arguments... */
    708711        arglist.lastp = &arglist.list;
    709712        varflag = 1;
  • trunk/src/kash/expand.c

    r2306 r2653  
    143143        STPUTC(psh, '\0', psh->expdest);
    144144        p = grabstackstr(psh, psh->expdest);
     145        TRACE2((psh, "expandarg: p='%s'\n", p));
    145146        psh->exparg.lastp = &psh->exparg.list;
    146147        /*
     
    12041205                if (metaflag == 0 || shfile_lstat(&psh->fdtab, psh->expdir, &statb) >= 0)
    12051206                        addfname(psh, psh->expdir);
     1207                TRACE2((psh, "expandarg: return #1 (metaflag=%d)\n", metaflag));
    12061208                return;
    12071209        }
     
    12251227                enddir[-1] = '\0';
    12261228        }
    1227         if ((dirp = shfile_opendir(&psh->fdtab, cp)) == NULL)
     1229        if ((dirp = shfile_opendir(&psh->fdtab, cp)) == NULL) {
     1230                TRACE2((psh, "expandarg: return #2 (shfile_opendir(,%s) failed)\n", cp));
    12281231                return;
     1232        }
    12291233        if (enddir != psh->expdir)
    12301234                enddir[-1] = '/';
  • trunk/src/kash/shfile.c

    r2652 r2653  
    18081808    shdir  *pdir = NULL;
    18091809
     1810    TRACE2((NULL, "shfile_opendir: dir='%s'\n", dir));
     1811    shfile_init_globals();
    18101812    if (g_pfnNtQueryDirectoryFile)
    18111813    {
     
    18401842            }
    18411843            else
    1842                 shfile_dos2errno(GetLastError());
     1844            {
     1845                errno = shfile_dos2errno(GetLastError());
     1846                TRACE2((NULL, "shfile_opendir: CreateFileA(%s) -> %d/%d\n", abspath, GetLastError(), errno));
     1847            }
    18431848        }
    18441849    }
     
    18471852    return pdir;
    18481853#else
     1854    TRACE2((NULL, "shfile_opendir: dir='%s'\n", dir));
    18491855    return (shdir *)opendir(dir);
    18501856#endif
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