Skip to content

Commit ea8b8e2

Browse files
Christopher Cordahidedekind
authored andcommitted
mtd: cmdlinepart: describe mtd ordering
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 <christophercordahi@nanometrics.ca> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
1 parent ebf4f07 commit ea8b8e2

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

‎drivers/mtd/cmdlinepart.c‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,22 @@
2323
* mtdparts=<mtddef>[;<mtddef]
2424
* <mtddef> := <mtd-id>:<partdef>[,<partdef>]
2525
* where <mtd-id> is the name from the "cat /proc/mtd" command
26-
* <partdef> := <size>[@offset][<name>][ro][lk]
26+
* <partdef> := <size>[@<offset>][<name>][ro][lk]
2727
* <mtd-id> := unique name used in mapping driver/device (mtd->name)
2828
* <size> := standard linux memsize OR "-" to denote all remaining space
29+
* size is automatically truncated at end of device
30+
* if specified or trucated size is 0 the part is skipped
31+
* <offset> := standard linux memsize
32+
* if omitted the part will immediately follow the previous part
33+
* or 0 if the first part
2934
* <name> := '(' NAME ')'
3035
*
36+
* <size> and <offset> can be specified such that the parts are out of order
37+
* in physical memory and may even overlap.
38+
*
39+
* The parts are assigned MTD numbers in the order they are specified in the
40+
* command line regardless of their order in physical memory.
41+
*
3142
* Examples:
3243
*
3344
* 1 NOR Flash, with 1 single writable partition:

0 commit comments

Comments
 (0)