- Timestamp:
- 04/05/11 15:01:41 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/regfi.c
r225 r226 573 573 574 574 575 off_t regfi_raw_seek(REGFI_RAW_FILE* self, off_t offset, int whence) 576 { 575 int64_t regfi_raw_seek(REGFI_RAW_FILE* self, uint64_t offset, int whence) 576 { 577 if(sizeof(off_t) == 4 && offset > 2147483647) 578 { 579 errno = EOVERFLOW; 580 return -1; 581 } 577 582 return lseek(*(int*)self->state, offset, whence); 578 583 } … … 587 592 * Convenience function to wrap up the ugly callback stuff 588 593 *****************************************************************************/ 589 off_t regfi_seek(REGFI_RAW_FILE* file_cb, off_t offset, int whence)594 uint64_t regfi_seek(REGFI_RAW_FILE* file_cb, uint64_t offset, int whence) 590 595 { 591 596 return file_cb->seek(file_cb, offset, whence); … … 1561 1566 REGFI_HBIN* hbin = NULL; 1562 1567 uint32_t hbin_off, cache_secret; 1563 int 32_t file_length;1568 int64_t file_length; 1564 1569 bool rla; 1565 1570 … … 1567 1572 * and one hbin. 1568 1573 */ 1569 file_length = file_cb->seek(file_cb, 0, SEEK_END);1574 file_length = regfi_seek(file_cb, 0, SEEK_END); 1570 1575 if(file_length < REGFI_REGF_SIZE+REGFI_HBIN_ALLOC) 1571 1576 { … … 1574 1579 return NULL; 1575 1580 } 1576 file_cb->seek(file_cb, 0, SEEK_SET);1581 regfi_seek(file_cb, 0, SEEK_SET); 1577 1582 1578 1583 if(output_encoding != REGFI_ENCODING_UTF8
Note: See TracChangeset
for help on using the changeset viewer.