- Timestamp:
- Apr 8, 2007, 10:24:07 PM (18 years ago)
- Location:
- branches/libc-0.6/src/emx/src/lib/sys
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/libc-0.6/src/emx/src/lib/sys/b_fsNativeFileStat.c
r2579 r3063 4 4 * LIBC SYS Backend - internal stat. 5 5 * 6 * Copyright (c) 2004-200 5 knut st. osmundsen <bird@innotek.de>6 * Copyright (c) 2004-2007 knut st. osmundsen <bird-src-spam@innotek.de> 7 7 * 8 8 * … … 85 85 * If potential device, then perform real check. 86 86 */ 87 /** @todo copy device check from the path resolver. */ 87 if ( (pszNativePath[1]== 'd' || pszNativePath[1] == 'D') 88 && (pszNativePath[2] == 'e' || pszNativePath[2] == 'E') 89 && (pszNativePath[3] == 'v' || pszNativePath[3] == 'V') 90 && (pszNativePath[4] == '/' || pszNativePath[4] == '\\') 91 ) 92 { 93 ULONG cb = 64; 94 PFSQBUFFER2 pfsqb = alloca(cb); 95 if (!DosQueryFSAttach((PCSZ)pszNativePath, 0, FSAIL_QUERYNAME, pfsqb, &cb)) 96 { 97 /* fake unix stuff */ 98 /** @todo this doesn't entirely match the open and file handle stat code. 99 * Fortunately, the user will not see that unless won't have the filename... */ 100 pStat->st_dev = __libc_back_fsPathCalcInodeAndDev(pszNativePath, &pStat->st_ino); 101 pStat->st_attr = FILE_NORMAL; 102 pStat->st_mode = S_IFCHR | S_IRWXO | S_IRWXG | S_IRWXU; 103 pStat->st_uid = 0; 104 pStat->st_gid = 0; 105 pStat->st_rdev = 0; /* b_ioFileOpen depends on this being 0 for devices! */ 106 pStat->st_nlink = 1; 107 pStat->st_size = 0; 108 pStat->st_blocks = 0; 109 pStat->st_blksize = 4096 * 12; /* 48kb */ 110 pStat->st_atime = 0; 111 pStat->st_mtime = 0; 112 pStat->st_ctime = 0; 113 pStat->st_birthtime = 0; 114 LIBCLOG_RETURN_INT(0); 115 } 116 } 88 117 89 118 /* -
branches/libc-0.6/src/emx/src/lib/sys/b_ioFileOpen.c
r2811 r3063 4 4 * LIBC SYS Backend - open. 5 5 * 6 * Copyright (c) 2003-200 5 knut st. osmundsen <bird@innotek.de>6 * Copyright (c) 2003-2007 knut st. osmundsen <bird-src-spam@innotek.de> 7 7 * Copyright (c) 1992-1996 by Eberhard Mattes 8 8 * … … 217 217 /* 218 218 * Character device or Block device: 219 * Translate the major/minor to an OS/2 device name and open that. 219 * Translate the major/minor to an OS/2 device name and open that, 220 * unless it's a native device of course (see b_fsNativeFileStat.c). 220 221 */ 221 222 case S_IFCHR: 222 223 case S_IFBLK: 223 224 { 225 if (st.st_rdev == 0) 226 break; 224 227 /** @todo assign major & minor numbers and do translations. */ 225 228 LIBCLOG_ERROR_RETURN_INT(-ENOTSUP);
Note:
See TracChangeset
for help on using the changeset viewer.