Messages in this thread | | | From | Linus Walleij <> | Date | Thu, 16 Apr 2020 11:51:38 +0200 | Subject | Re: [PATCH] mtd: parsers: Support '[]' for id in mtdparts |
| |
On Mon, Apr 6, 2020 at 6:10 PM Ronald G. Minnich <rminnich@gmail.com> wrote:
> The MTD subsystem can support command-line defined partitions > for one or more MTD devices. > > The format is: > * mtdparts=<mtddef>[;<mtddef] > * <mtddef> := <mtd-id>:<partdef>[,<partdef>] > > The ':' separates the id from the partdef. > > On PCI MTD devices, the name can be the PCI slot name, > e.g. 0000:00:1f.5. There are two ':' in the name alone. > > Change the definition of <mtd-id> so it can be bracketed > with '[]' and hence contain any number of ':'. > An opening '[' must be matched with a closing ']'. > The ':' continues to separate the mtd-id from the <partdef>. > > Signed-off-by: Ronald G. Minnich <rminnich@google.com>
It's a reasonable approach, I was a bit confused for a while because [] is both used as literals and as meta-characters in the syntax description which becomes a bit terse.
But it's no big deal so: Reviewed- by: Linus Walleij <linus.walleij@linaro.org>
> Change-Id: I17a757e65f532b11606c7bb104f08837bcd444b9
Upstream don't like Gerrit IDs but surely the maintainer can drop this when applying.
I suppose the use case is using PCI-based MTD devices for testing something android images on desktops? I'm surprised it didn't come up earlier.
Yours, Linus Walleij
| |