From patchwork Tue Apr 26 09:30:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marian Rotariu X-Patchwork-Id: 614888 X-Patchwork-Delegate: david.oberhollenzer@sigma-star.at Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2001:1868:205::9]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3qvHtn6rggz9s9Z for ; Tue, 26 Apr 2016 19:32:33 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1auzKf-0004Gg-SN; Tue, 26 Apr 2016 09:31:01 +0000 Received: from relay1.mentorg.com ([192.94.38.131]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1auzKa-0003Pj-Vg for linux-mtd@lists.infradead.org; Tue, 26 Apr 2016 09:30:58 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-01.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1auzKI-0000rQ-C2 from Marian_Rotariu@mentor.com for linux-mtd@lists.infradead.org; Tue, 26 Apr 2016 02:30:38 -0700 Received: from mrotariu-Precision-M4800.world.mentorg.com (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.3.224.2; Tue, 26 Apr 2016 10:30:37 +0100 From: Marian Rotariu To: Subject: [PATCH 1/4] mtd-utils: add support for erase regions Date: Tue, 26 Apr 2016 12:30:21 +0300 Message-ID: <1461663024-12022-2-git-send-email-marian_rotariu@mentor.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1461663024-12022-1-git-send-email-marian_rotariu@mentor.com> References: <1461663024-12022-1-git-send-email-marian_rotariu@mentor.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160426_023057_054899_CFF58E09 X-CRM114-Status: GOOD ( 10.58 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [192.94.38.131 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marian Rotariu Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org This field will reflect the mtd->numeraseregions available in the kernel space. Signed-off-by: Marian Rotariu --- include/libmtd.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/libmtd.h b/include/libmtd.h index a78c8cb..b111a77 100644 --- a/include/libmtd.h +++ b/include/libmtd.h @@ -67,6 +67,7 @@ struct mtd_info * @subpage_size: sub-page size * @oob_size: OOB size (zero if the device does not have OOB area) * @region_cnt: count of additional erase regions + * @reginfo: erase regions information * @writable: zero if the device is read-only * @bb_allowed: non-zero if the MTD device may have bad eraseblocks */ @@ -85,6 +86,7 @@ struct mtd_dev_info int subpage_size; int oob_size; int region_cnt; + struct region_info_user *reginfo; unsigned int writable:1; unsigned int bb_allowed:1; };