From patchwork Tue Dec 18 21:11:51 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Cordahi X-Patchwork-Id: 207211 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:4978:20e::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 63D782C008E for ; Wed, 19 Dec 2012 08:15:36 +1100 (EST) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Tl4Ue-0005cg-IB; Tue, 18 Dec 2012 21:14:28 +0000 Received: from mail-ia0-f174.google.com ([209.85.210.174]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Tl4Ub-0005cK-VD for linux-mtd@lists.infradead.org; Tue, 18 Dec 2012 21:14:27 +0000 Received: by mail-ia0-f174.google.com with SMTP id y25so1029462iay.19 for ; Tue, 18 Dec 2012 13:14:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nanometrics.ca; s=google; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:in-reply-to:references; bh=cZ5NrazU2N5kCTJHR6Pvvu5Cpo9GLGCouWeHS0kLPRk=; b=dxC758hUrLN6W29+mZrW7kf34WACs8TGfqtnSFzpG/Yv9dqFm1MkSykaB5TpDPPlGx HipwNepv/webQ5Cu4R64MgcAthfSjPrHdtbZhZkvTCT56Cj/FWwcGJ3UaTLmt9OE9d+j MDGB5RByl0Ney80DEdfq3tWHNvNo0tX6vyTUg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:in-reply-to:references:x-gm-message-state; bh=cZ5NrazU2N5kCTJHR6Pvvu5Cpo9GLGCouWeHS0kLPRk=; b=KNP7g2Des6v7uzaCYVaTByDslMt4w6W9szPdL3pb6n8nVSDHSdIcUAUaeMWrB60x6U FnvQSfZMozAEVODNX33uZ19NtHGLfHlpDe2hr/jwT7A1cSVvZVuMe6EclJ3ew9hJCh4M A4bg3k4xetZmy/kxvyJVD3Jrsi4bgQk3WFi052ANKFe6A5fw3vPOYczDDDjXz6PxXogB ggTSobUfOw6tO4+dlX4C3j9OUp5XGupdPFhBuWDRSMaAmjASi7+gQ9ABU8txJj4FjZvu VQd3IboMkRQ9V+aPcdoh6ukurNbvNeUHJqZHfFwmrIPg1EvrGoHCOqDgNUbsKRF4je8z klpA== X-Received: by 10.50.149.131 with SMTP id ua3mr4694251igb.5.1355865264885; Tue, 18 Dec 2012 13:14:24 -0800 (PST) Received: from localhost.localdomain ([206.191.47.130]) by mx.google.com with ESMTPS id c3sm9268539igj.1.2012.12.18.13.14.23 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 18 Dec 2012 13:14:24 -0800 (PST) From: Christopher Cordahi To: David Woodhouse Subject: [PATCH 1/2] mtd: cmdlinepart: describe mtd ordering Date: Tue, 18 Dec 2012 16:11:51 -0500 Message-Id: <653ac5f88c42f6d24be04c354ddbadd8db20b8ba.1355863937.git.christophercordahi@nanometrics.ca> X-Mailer: git-send-email 1.7.1 In-Reply-To: References: In-Reply-To: References: X-Gm-Message-State: ALoCoQkGw5dREhe6mqR21i0ioO72BO6snE08zB9FqqkmWb24ErpRmazVD9Y3MYuZivIpc4TfifFb X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121218_161426_094573_C48DDB4A X-CRM114-Status: GOOD ( 13.54 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.210.174 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] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: Artem Bityutskiy , Huang Shijie , Linux MTD mailing list , Shmulik Ladkani , Christopher Cordahi , Brian Norris , Huang Shijie X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org The mtd documentation makes no mention of the useful feature whereby partitions' logical ordering need not match their physical ordering. Truncation of parts, skipping of zero sized parts, and handling of overlapping parts are similarly not mentioned. This updates the comments at the top of file describing the command line parsing as currently implemented. I proposed this in http://lists.infradead.org/pipermail/linux-mtd/2012-December/045314.html Signed-off-by: Christopher Cordahi --- drivers/mtd/cmdlinepart.c | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-) diff --git a/drivers/mtd/cmdlinepart.c b/drivers/mtd/cmdlinepart.c index 525c579..8d4a166 100644 --- a/drivers/mtd/cmdlinepart.c +++ b/drivers/mtd/cmdlinepart.c @@ -23,11 +23,22 @@ * mtdparts=[; := :[,] * where is the name from the "cat /proc/mtd" command - * := [@offset][][ro][lk] + * := [@][][ro][lk] * := unique name used in mapping driver/device (mtd->name) * := standard linux memsize OR "-" to denote all remaining space + * size is automatically truncated at end of device + * if specified or trucated size is 0 the part is skipped + * := standard linux memsize + * if omitted the part will immediately follow the previous part + * or 0 if the first part * := '(' NAME ')' * + * and can be specified such that the parts are out of order + * in physical memory and may even overlap. + * + * The parts are assigned MTD numbers in the order they are specified in the + * command line regardless of their order in physical memory. + * * Examples: * * 1 NOR Flash, with 1 single writable partition: