]> www.infradead.org Git - mtd-utils.git/commit
mkfs.jffs2: Set mkfs.jffs2 page size runtime instead of fixed
authorRicard Wanderlof <ricard.wanderlof@axis.com>
Thu, 20 Dec 2007 11:46:38 +0000 (22:46 +1100)
committerJosh Boyer <jwboyer@gmail.com>
Thu, 20 Dec 2007 15:34:52 +0000 (09:34 -0600)
commit6fb0083666f126d5c0df0c67c30effcb806b5987
tree05a55ee32aaa9152b5b876686cec4005af5ad84b
parent1ba6959299cb386faf178317b21ffd61689246b5
mkfs.jffs2: Set mkfs.jffs2 page size runtime instead of fixed

This patch reads the default PAGE_SIZE from sysconf(), i.e. the system
mkfs.jffs2 is running on, instead of just setting it to 4096 (which of
course is valid for most systems but not all).

This is useful if mkfs.jffs2 is running on the target system, e.g. to
create a backup image during firmware upgrade, so that the page size does
not have to be set explicitly using a command line parameter.

The --pagesize option is supported just as before.

If the user has not set the page size explicitly with --pagesize, and
the system page size is anything other than 4096, warn the user that
an unusual page size is being used, since this behavior is different
from before.

Signed-off-by Ricard Wanderlöf <ricardw@axis.com> .
Signed-off-by: Josh Boyer <jwboyer@gmail.com>
mkfs.jffs2.c