VirtualBox

Changeset 2301 in kBuild for trunk/src/kash/shfile.c


Ignore:
Timestamp:
Mar 1, 2009 5:37:11 AM (16 years ago)
Author:
bird
Message:

kash: Removed the SH_PURE_STUB_MODE code.

File:
1 edited

Legend:

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

    r2298 r2301  
    2525 */
    2626
     27/*******************************************************************************
     28*   Header Files                                                               *
     29*******************************************************************************/
    2730#include "shfile.h"
    2831#include "shinstance.h" /* TRACE2 */
     
    5053 * Whether the file descriptor table stuff is actually in use or not.
    5154 */
    52 #if !defined(SH_PURE_STUB_MODE) \
    53  && (   K_OS == K_OS_WINDOWS \
    54      || (   !defined(SH_STUB_MODE) \
    55          && !defined(SH_FORKED_MODE)) \
    56     )
     55#if K_OS == K_OS_WINDOWS \
     56 || (   !defined(SH_STUB_MODE) \
     57     && !defined(SH_FORKED_MODE))
    5758# define SHFILE_IN_USE
    5859#endif
     
    599600# endif /* K_OS != K_OS_WINDOWS */
    600601
    601 #elif defined(SH_PURE_STUB_MODE)
    602     fd = -1;
    603     errno = ENOSYS;
    604 
    605602#elif defined(SH_STUB_MODE) || defined(SH_FORKED_MODE)
    606603    fd = open(name, flags, mode);
     
    684681    }
    685682
    686 #elif defined(SH_PURE_STUB_MODE)
    687     rc = -1;
    688     errno = ENOSYS;
    689 
    690683#elif defined(SH_STUB_MODE) || defined(SH_FORKED_MODE)
    691684# ifdef _MSC_VER
     
    703696{
    704697    int rc;
    705 #ifdef SH_PURE_STUB_MODE
    706     rc = -1;
    707 
    708 #elif defined(SH_STUB_MODE) || defined(SH_FORKED_MODE)
     698#if defined(SH_STUB_MODE) || defined(SH_FORKED_MODE)
    709699    rc = dup(fd);
    710700
     
    738728    else
    739729        rc = -1;
    740 
    741 #elif defined(SH_PURE_STUB_MODE)
    742     rc = -1;
    743730
    744731#elif defined(SH_STUB_MODE) || defined(SH_FORKED_MODE)
     
    776763        rc = -1;
    777764
    778 #elif defined(SH_PURE_STUB_MODE)
    779     rc = -1;
    780 
    781765#elif defined(SH_STUB_MODE) || defined(SH_FORKED_MODE)
    782766# ifdef _MSC_VER
     
    814798    else
    815799        rc = -1;
    816 
    817 #elif defined(SH_PURE_STUB_MODE)
    818     rc = -1;
    819800
    820801#elif defined(SH_STUB_MODE) || defined(SH_FORKED_MODE)
     
    854835    else
    855836        rc = -1;
    856 
    857 #elif defined(SH_PURE_STUB_MODE)
    858     rc = -1;
    859837
    860838#elif defined(SH_STUB_MODE) || defined(SH_FORKED_MODE)
     
    940918    else
    941919        rc = -1;
    942 
    943 #elif defined(SH_PURE_STUB_MODE)
    944     rc = -1;
    945920
    946921#elif defined(SH_STUB_MODE) || defined(SH_FORKED_MODE)
     
    1013988int shfile_stat(shfdtab *pfdtab, const char *path, struct stat *pst)
    1014989{
    1015 #ifdef SH_PURE_STUB_MODE
    1016     return -1;
    1017 
    1018 #elif defined(SH_STUB_MODE) || defined(SH_FORKED_MODE)
     990#if defined(SH_STUB_MODE) || defined(SH_FORKED_MODE)
    1019991    return stat(path, pst);
    1020992
     
    1025997int shfile_lstat(shfdtab *pfdtab, const char *link, struct stat *pst)
    1026998{
    1027 #ifdef SH_PURE_STUB_MODE
    1028     return -1;
    1029 
    1030 #elif defined(SH_STUB_MODE) || defined(SH_FORKED_MODE)
     999#if defined(SH_STUB_MODE) || defined(SH_FORKED_MODE)
    10311000# ifdef _MSC_VER
    10321001    return stat(link, pst);
     
    10411010int shfile_chdir(shfdtab *pfdtab, const char *path)
    10421011{
    1043 #ifdef SH_PURE_STUB_MODE
    1044     return -1;
    1045 
    1046 #elif defined(SH_STUB_MODE) || defined(SH_FORKED_MODE)
     1012#if defined(SH_STUB_MODE) || defined(SH_FORKED_MODE)
    10471013# ifdef _MSC_VER //???
    10481014    return chdir(path);
     
    10571023char *shfile_getcwd(shfdtab *pfdtab, char *buf, int len)
    10581024{
    1059 #ifdef SH_PURE_STUB_MODE
    1060     return NULL;
    1061 
    1062 #elif defined(SH_STUB_MODE) || defined(SH_FORKED_MODE)
     1025#if defined(SH_STUB_MODE) || defined(SH_FORKED_MODE)
    10631026    return getcwd(buf, len);
    10641027
     
    10691032int shfile_access(shfdtab *pfdtab, const char *path, int type)
    10701033{
    1071 #ifdef SH_PURE_STUB_MODE
    1072     return -1;
    1073 
    1074 #elif defined(SH_STUB_MODE) || defined(SH_FORKED_MODE)
     1034#if defined(SH_STUB_MODE) || defined(SH_FORKED_MODE)
    10751035# ifdef _MSC_VER
    10761036    type &= ~X_OK;
     
    10881048    int rc;
    10891049
    1090 #ifdef SH_PURE_STUB_MODE
    1091     rc = 0;
    1092 #elif defined(SH_STUB_MODE) || defined(SH_FORKED_MODE)
     1050#if defined(SH_STUB_MODE) || defined(SH_FORKED_MODE)
    10931051    rc = isatty(fd);
    10941052#else
     
    11041062    int rc;
    11051063
    1106 #ifdef SH_PURE_STUB_MODE
    1107     rc = -1;
    1108 
    1109 #elif defined(SH_STUB_MODE) || defined(SH_FORKED_MODE)
     1064#if defined(SH_STUB_MODE) || defined(SH_FORKED_MODE)
    11101065# ifdef _MSC_VER
    11111066    errno = ENOSYS;
     
    11281083    int rc;
    11291084
    1130 #ifdef SH_PURE_STUB_MODE
    1131     rc = -1;
    1132 
    1133 #elif defined(SH_STUB_MODE) || defined(SH_FORKED_MODE)
     1085#if defined(SH_STUB_MODE) || defined(SH_FORKED_MODE)
    11341086# ifdef _MSC_VER
    11351087    errno = ENOSYS;
     
    11491101mode_t shfile_get_umask(shfdtab *pfdtab)
    11501102{
    1151 #ifdef SH_PURE_STUB_MODE
     1103#if defined(SH_STUB_MODE) || defined(SH_FORKED_MODE)
    11521104    return 022;
    11531105
    1154 #elif defined(SH_STUB_MODE) || defined(SH_FORKED_MODE)
    1155     return 022;
    1156 
    11571106#else
    11581107#endif
     
    11671116shdir *shfile_opendir(shfdtab *pfdtab, const char *dir)
    11681117{
    1169 #ifdef SH_PURE_STUB_MODE
    1170     return NULL;
    1171 
    1172 #elif defined(SH_STUB_MODE) || defined(SH_FORKED_MODE)
     1118#if defined(SH_STUB_MODE) || defined(SH_FORKED_MODE)
    11731119# ifdef _MSC_VER
    11741120    errno = ENOSYS;
     
    11841130shdirent *shfile_readdir(struct shdir *pdir)
    11851131{
    1186 #ifdef SH_PURE_STUB_MODE
    1187     return NULL;
    1188 
    1189 #elif defined(SH_STUB_MODE) || defined(SH_FORKED_MODE)
     1132#if defined(SH_STUB_MODE) || defined(SH_FORKED_MODE)
    11901133# ifdef _MSC_VER
    11911134    errno = ENOSYS;
     
    12021145void shfile_closedir(struct shdir *pdir)
    12031146{
    1204 #ifdef SH_PURE_STUB_MODE
    1205     return NULL;
    1206 
    1207 #elif defined(SH_STUB_MODE) || defined(SH_FORKED_MODE)
     1147#if defined(SH_STUB_MODE) || defined(SH_FORKED_MODE)
    12081148# ifdef _MSC_VER
    12091149    errno = ENOSYS;
Note: See TracChangeset for help on using the changeset viewer.

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