Double block_buffer devel
authorDinar Valeev <dvaleev@suse.com>
Tue, 21 May 2013 12:22:55 +0000 (14:22 +0200)
committerTony Breeds <tony@bakeyournoodle.com>
Wed, 22 May 2013 00:57:54 +0000 (10:57 +1000)
We have block_buffer equal to MAX_BLOCK_SIZE. If we're working with 4k
aligned device, it is not enough, since we're reading too blocks.

Let's double it.

Signed-off-by: Dinar Valeev <dvaleev@suse.com>
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
second/partition.c

index d805ad0c3d516bcd855a70dcd18c73987affb297..1ade1b671f4e422b28546407ecfc5aace2a2ebe9 100644 (file)
@@ -64,7 +64,7 @@ static const char *valid_mac_partition_types[] = {
 
 
 #define MAX_BLOCK_SIZE 4096
-static unsigned char block_buffer[MAX_BLOCK_SIZE];
+static unsigned char block_buffer[MAX_BLOCK_SIZE * 2];
 
 static void
 add_new_partition(struct partition_t** list, int part_number, const char *part_type,