Changeset 3062
- Timestamp:
- Apr 8, 2007, 10:23:29 PM (18 years ago)
- Location:
- trunk/libc/src/kNIX/os2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libc/src/kNIX/os2/b_fsNativeFileStat.c
r2929 r3062 4 4 * kNIX - internal stat. 5 5 * 6 * Copyright (c) 2004-200 5knut st. osmundsen <bird-src-spam@anduin.net>6 * Copyright (c) 2004-2007 knut st. osmundsen <bird-src-spam@anduin.net> 7 7 * 8 8 * … … 67 67 * If potential device, then perform real check. 68 68 */ 69 /** @todo copy device check from the path resolver. */ 69 if ( (pszNativePath[1]== 'd' || pszNativePath[1] == 'D') 70 && (pszNativePath[2] == 'e' || pszNativePath[2] == 'E') 71 && (pszNativePath[3] == 'v' || pszNativePath[3] == 'V') 72 && (pszNativePath[4] == '/' || pszNativePath[4] == '\\') 73 ) 74 { 75 ULONG cb = 64; 76 PFSQBUFFER2 pfsqb = alloca(cb); 77 if (!DosQueryFSAttach((PCSZ)pszNativePath, 0, FSAIL_QUERYNAME, pfsqb, &cb)) 78 { 79 /* fake unix stuff */ 80 /** @todo this doesn't entirely match the open and file handle stat code. 81 * Fortunately, the user will not see that unless won't have the filename... */ 82 pStat->st_dev = __libc_back_fsPathCalcInodeAndDev(pszNativePath, &pStat->st_ino); 83 pStat->st_attr = FILE_NORMAL; 84 pStat->st_mode = S_IFCHR | S_IRWXO | S_IRWXG | S_IRWXU; 85 pStat->st_uid = 0; 86 pStat->st_gid = 0; 87 pStat->st_rdev = 0; /* b_ioFileOpen depends on this being 0 for devices! */ 88 pStat->st_nlink = 1; 89 pStat->st_size = 0; 90 pStat->st_blocks = 0; 91 pStat->st_blksize = 4096 * 12; /* 48kb */ 92 pStat->st_atime = 0; 93 pStat->st_mtime = 0; 94 pStat->st_ctime = 0; 95 pStat->st_birthtime = 0; 96 LIBCLOG_RETURN_INT(0); 97 } 98 } 70 99 71 100 /* -
trunk/libc/src/kNIX/os2/b_ioFileOpen.c
r2929 r3062 4 4 * kNIX - open, OS/2. 5 5 * 6 * Copyright (c) 2003-200 6knut st. osmundsen <bird-src-spam@anduin.net>6 * Copyright (c) 2003-2007 knut st. osmundsen <bird-src-spam@anduin.net> 7 7 * Copyright (c) 1992-1996 by Eberhard Mattes 8 8 * … … 192 192 /* 193 193 * Character device or Block device: 194 * Translate the major/minor to an OS/2 device name and open that. 194 * Translate the major/minor to an OS/2 device name and open that, 195 * unless it's a native device of course (see b_fsNativeFileStat.c). 195 196 */ 196 197 case S_IFCHR: 197 198 case S_IFBLK: 198 199 { 200 if (st.st_rdev == 0) 201 break; 199 202 /** @todo assign major & minor numbers and do translations. */ 200 203 LIBCLOG_ERROR_RETURN_INT(-ENOTSUP);
Note:
See TracChangeset
for help on using the changeset viewer.