Changeset 2850 in kBuild for trunk/src/lib/nt/ntstat.c
- Timestamp:
- Aug 30, 2016 4:06:31 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/nt/ntstat.c
r2710 r2850 534 534 535 535 /** 536 * Special case that only gets the file size and nothing else. 537 */ 538 int birdStatOnFdJustSize(int fd, __int64 *pcbFile) 539 { 540 int rc; 541 HANDLE hFile = (HANDLE)_get_osfhandle(fd); 542 if (hFile != INVALID_HANDLE_VALUE) 543 { 544 LARGE_INTEGER cbLocal; 545 if (GetFileSizeEx(hFile, &cbLocal)) 546 { 547 *pcbFile = cbLocal.QuadPart; 548 rc = 0; 549 } 550 else 551 { 552 BirdStat_T Stat; 553 rc = birdStatOnFd(fd, &Stat); 554 if (rc == 0) 555 *pcbFile = Stat.st_size; 556 } 557 } 558 else 559 rc = -1; 560 return rc; 561 } 562 563 564 /** 536 565 * Implements UNIX stat(). 537 566 */
Note:
See TracChangeset
for help on using the changeset viewer.