From patchwork Mon Oct 8 18:15:25 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Warren X-Patchwork-Id: 190098 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 2BFE62C0209 for ; Tue, 9 Oct 2012 05:36:31 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id DA5EB280ED; Mon, 8 Oct 2012 20:35:50 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2T09pTm5XNx0; Mon, 8 Oct 2012 20:35:50 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9A211281D4; Mon, 8 Oct 2012 20:35:42 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2E21F280ED for ; Mon, 8 Oct 2012 20:35:37 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id y550x7tUbofs for ; Mon, 8 Oct 2012 20:35:36 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from avon.wwwdotorg.org (avon.wwwdotorg.org [70.85.31.133]) by theia.denx.de (Postfix) with ESMTPS id A28D4281D4 for ; Mon, 8 Oct 2012 20:35:34 +0200 (CEST) Received: from severn.wwwdotorg.org (unknown [192.168.65.5]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by avon.wwwdotorg.org (Postfix) with ESMTPS id AC6C66233; Mon, 8 Oct 2012 12:15:39 -0600 (MDT) Received: from localhost.localdomain (localhost [127.0.0.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by severn.wwwdotorg.org (Postfix) with ESMTPSA id 2CFEFE40F2; Mon, 8 Oct 2012 12:15:34 -0600 (MDT) From: Stephen Warren To: Tom Rini Date: Mon, 8 Oct 2012 12:15:25 -0600 Message-Id: <1349720127-13169-1-git-send-email-swarren@wwwdotorg.org> X-Mailer: git-send-email 1.7.0.4 X-NVConfidentiality: public X-Virus-Scanned: clamav-milter 0.96.5 at avon.wwwdotorg.org X-Virus-Status: Clean Cc: u-boot@lists.denx.de, Stephen Warren , Rob Herring Subject: [U-Boot] [PATCH 1/3] part: add partition number to disk_partition_t X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de From: Stephen Warren The FAT filesystem code knows which partition ID it is operating on. Currently, this is passed to fat_register_device() as a parameter. In order to convert FAT to the more standardized fat_set_blk_dev(), the information needs to come from somewhere else, and the partition definition structure is the logical place. Signed-off-by: Stephen Warren --- This series is based on the part_efi/dos partition table printing series I just sent. disk/part.c | 1 + include/part.h | 1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/disk/part.c b/disk/part.c index a0c77dd..2bc7acb 100644 --- a/disk/part.c +++ b/disk/part.c @@ -391,6 +391,7 @@ int get_partition_info(block_dev_desc_t *dev_desc, int part defined(CONFIG_MMC) || \ defined(CONFIG_SYSTEMACE) + info->part = part; #ifdef CONFIG_PARTITION_UUIDS /* The common case is no UUID support */ info->uuid[0] = 0; diff --git a/include/part.h b/include/part.h index 27ea283..ebdebd8 100644 --- a/include/part.h +++ b/include/part.h @@ -88,6 +88,7 @@ typedef struct block_dev_desc { #define DEV_TYPE_OPDISK 0x07 /* optical disk */ typedef struct disk_partition { + int part; /* Partition number */ ulong start; /* # of first block in partition */ ulong size; /* number of blocks in partition */ ulong blksz; /* block size in bytes */