diff --git a/src/add-ons/kernel/file_systems/userlandfs/server/haiku_block_cache.cpp b/src/add-ons/kernel/file_systems/userlandfs/server/haiku_block_cache.cpp index 029044ff3a..eb4f5b9f06 100644 --- a/src/add-ons/kernel/file_systems/userlandfs/server/haiku_block_cache.cpp +++ b/src/add-ons/kernel/file_systems/userlandfs/server/haiku_block_cache.cpp @@ -1071,7 +1071,7 @@ block_cache_sync_etc(void *_cache, off_t blockNumber, size_t numBlocks) if (blockNumber < 0 || blockNumber >= cache->max_blocks) { panic("block_cache_sync_etc: invalid block number %Ld (max %Ld)", blockNumber, cache->max_blocks - 1); - return B_ERROR; + return B_BAD_VALUE; } BenaphoreLocker locker(&cache->lock); diff --git a/src/system/kernel/cache/block_cache.cpp b/src/system/kernel/cache/block_cache.cpp index a1991c340c..e5c068b8a6 100644 --- a/src/system/kernel/cache/block_cache.cpp +++ b/src/system/kernel/cache/block_cache.cpp @@ -1182,7 +1182,7 @@ block_cache_sync_etc(void *_cache, off_t blockNumber, size_t numBlocks) if (blockNumber < 0 || blockNumber >= cache->max_blocks) { panic("block_cache_sync_etc: invalid block number %Ld (max %Ld)", blockNumber, cache->max_blocks - 1); - return B_ERROR; + return B_BAD_VALUE; } BenaphoreLocker locker(&cache->lock);