reiserfs: Fix the build and enable on x86_64.

This commit is contained in:
Augustin Cavalier
2018-08-22 19:19:54 -04:00
parent de66924c46
commit e0d28cdccf
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -235,7 +235,7 @@ SYSTEM_ADD_ONS_FILE_SYSTEMS =
log_overlay log_overlay
ntfs ntfs
packagefs packagefs
reiserfs@x86 reiserfs
udf udf
write_overlay write_overlay
; ;
@@ -1336,8 +1336,8 @@ StreamReader::ReadAt(off_t position, void *buffer, size_t bufferSize,
&& (error = _SeekTo(position)) == B_OK) { && (error = _SeekTo(position)) == B_OK) {
//PRINT((" seeked to %Ld: fItemOffset: %Ld, fItemSize: %Ld\n", position, //PRINT((" seeked to %Ld: fItemOffset: %Ld, fItemSize: %Ld\n", position,
//fItemOffset, fItemSize)); //fItemOffset, fItemSize));
off_t inItemOffset = max(0LL, position - fItemOffset); off_t inItemOffset = max_c(0LL, position - fItemOffset);
off_t toRead = min(fItemSize - inItemOffset, (off_t)bufferSize); off_t toRead = min_c(fItemSize - inItemOffset, (off_t)bufferSize);
switch (fItem.GetType()) { switch (fItem.GetType()) {
case TYPE_INDIRECT: case TYPE_INDIRECT:
error = _ReadIndirectItem(inItemOffset, buffer, toRead); error = _ReadIndirectItem(inItemOffset, buffer, toRead);
@@ -1520,8 +1520,8 @@ StreamReader::_ReadIndirectItem(off_t offset, void *buffer, size_t bufferSize)
if (error == B_OK) { if (error == B_OK) {
// copy the data into the buffer // copy the data into the buffer
off_t blockOffset = i * (off_t)fBlockSize; off_t blockOffset = i * (off_t)fBlockSize;
uint32 localOffset = max(0LL, offset - blockOffset); uint32 localOffset = max_c(0LL, offset - blockOffset);
uint32 toRead = min(fBlockSize - localOffset, bufferSize); uint32 toRead = min_c(fBlockSize - localOffset, bufferSize);
memcpy(buffer, (uint8*)block->GetData() + localOffset, toRead); memcpy(buffer, (uint8*)block->GetData() + localOffset, toRead);
block->Put(); block->Put();
bufferSize -= toRead; bufferSize -= toRead;