From patchwork Tue May 21 12:22:55 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dinar Valeev X-Patchwork-Id: 245301 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (localhost [IPv6:::1]) by ozlabs.org (Postfix) with ESMTP id 3F25E2C00F0 for ; Tue, 21 May 2013 22:23:54 +1000 (EST) Received: from mail-wg0-x229.google.com (mail-wg0-x229.google.com [IPv6:2a00:1450:400c:c00::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 5DFBA2C00A7 for ; Tue, 21 May 2013 22:23:52 +1000 (EST) Received: by mail-wg0-f41.google.com with SMTP id c11so1701424wgh.0 for ; Tue, 21 May 2013 05:23:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=kc55I4NBmMsKk034s79EuWfHgNX6zrqkp6nVwmi9qVI=; b=trKCo5nC8WLksBAJGnuVd2Q5J2aSs2ig0GsZI+fXg/PyGgrAhyoWE21ZdEnhcMDvab 8kj5XdE2VJ3AnqEnbP+73++ZzXmPd0ZQS8gV06WMSSlTOUZu6wMiU895FOLhuwcqVKix spwHnoDOQ0NiJVHIgSWgVPpiBsVJYh8CvzIFS/hWpu6my2j/+Mk/EgdiwK225TdGevoS AzFdrOvq8qY3NuOrS2U+99cBtumXzqBMfPUeqjWxignBYQAcOErtTU37rpnWmXdfW994 NFH6CYwZZBZavYDbBKe9s7aAy9Crk9YKQctaBiFIjl39AOO/o7OkG6KZjz++OuUX8dV2 IRLw== X-Received: by 10.180.188.141 with SMTP id ga13mr23501962wic.9.1369139020105; Tue, 21 May 2013 05:23:40 -0700 (PDT) Received: from petersburg.suse.cz.cz ([94.230.156.157]) by mx.google.com with ESMTPSA id w8sm30421062wiz.0.2013.05.21.05.23.38 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 21 May 2013 05:23:39 -0700 (PDT) From: Dinar valeev To: yaboot-devel@lists.ozlabs.org Subject: [PATCH 2/2] Double block_buffer Date: Tue, 21 May 2013 14:22:55 +0200 Message-Id: <1369138975-17619-2-git-send-email-k0da@opensuse.org> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1369138975-17619-1-git-send-email-k0da@opensuse.org> References: <1369138975-17619-1-git-send-email-k0da@opensuse.org> Cc: tonyb@au1.ibm.com, Dinar Valeev X-BeenThere: yaboot-devel@lists.ozlabs.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Technical and development discussion regarding yaboot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: yaboot-devel-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Yaboot-devel" From: Dinar Valeev 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 --- second/partition.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/second/partition.c b/second/partition.c index d805ad0..1ade1b6 100644 --- a/second/partition.c +++ b/second/partition.c @@ -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,