Changeset 3912 for branches/libc-0.6/src
- Timestamp:
- Oct 24, 2014, 1:03:46 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/libc-0.6/src/emx/src/lib/sys/fs.c
r3911 r3912 355 355 __libc_gcchUnixRoot = cch; 356 356 357 ULONG ulDisk, ulIgnored; 358 rc = DosQueryCurrentDisk(&ulDisk, &ulIgnored); 359 if ( rc == NO_ERROR 360 && ulDisk + 'A' - 1 == __libc_gszUnixRoot[0]) 357 if (!getenv("UNIXROOT_OUTSIDE")) 361 358 { 362 if (cch == 3) 363 __libc_gfInUnixTree = 1; 364 else 359 ULONG ulDisk, ulIgnored; 360 rc = DosQueryCurrentDisk(&ulDisk, &ulIgnored); 361 if ( rc == NO_ERROR 362 && ulDisk + 'A' - 1 == __libc_gszUnixRoot[0]) 365 363 { 366 char szCurDir[PATH_MAX]; 367 ULONG cbCurDir = sizeof(szCurDir); 368 rc = DosQueryCurrentDir(0, (PSZ)&szCurDir[0], &cbCurDir); 369 __libc_gfInUnixTree = rc == NO_ERROR 370 && cch <= cbCurDir + 3 371 && memicmp(&__libc_gszUnixRoot[3], szCurDir, cch - 3) == 0 372 && ( cch == cbCurDir + 3 373 || szCurDir[cch - 3] == '\\'); 364 if (cch == 3) 365 __libc_gfInUnixTree = 1; 366 else 367 { 368 char szCurDir[PATH_MAX]; 369 ULONG cbCurDir = sizeof(szCurDir); 370 rc = DosQueryCurrentDir(0, (PSZ)&szCurDir[0], &cbCurDir); 371 __libc_gfInUnixTree = rc == NO_ERROR 372 && cch <= cbCurDir + 3 373 && memicmp(&__libc_gszUnixRoot[3], szCurDir, cch - 3) == 0 374 && ( cch == cbCurDir + 3 375 || szCurDir[cch - 3] == '\\'); 376 } 377 374 378 } 375 376 379 } 377 380 LIBCLOG_MSG(__libc_gfInUnixTree ? "Inside unixroot chroot.\n" : "Outside unixroot chroot.\n");
Note:
See TracChangeset
for help on using the changeset viewer.