From 8d007b60d33c7323b7ed53b58004e461a89e507f Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sat, 14 Jul 2012 20:27:00 +0800 Subject: [PATCH] Kernel - Fixed bug in DrvUtil_Disk causing bad return values --- KernelLand/Kernel/drvutil_disk.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/KernelLand/Kernel/drvutil_disk.c b/KernelLand/Kernel/drvutil_disk.c index db4d631a..49dc7b23 100644 --- a/KernelLand/Kernel/drvutil_disk.c +++ b/KernelLand/Kernel/drvutil_disk.c @@ -49,6 +49,7 @@ Uint64 DrvUtil_ReadBlock(Uint64 Start, Uint64 Length, void *Buffer, else { num = Length / BlockSize; tailings = Length % BlockSize; + leading = 0; } // Read central blocks @@ -57,6 +58,7 @@ Uint64 DrvUtil_ReadBlock(Uint64 Start, Uint64 Length, void *Buffer, LOG("Reading %i blocks", num); ret = ReadBlocks(block, num, Buffer, Argument); if(ret != num ) { + LOG("Incomplete read (%i != %i)", ret, num); LEAVE('X', leading + ret * BlockSize); return leading + ret * BlockSize; } -- 2.20.1