running out of space dd'ing JFFS2 image to /dev/mtdblock/0

Robert P. J. Day rpjday at mindspring.com
Mon Jan 31 17:30:26 EST 2005


On Mon, 31 Jan 2005, Thomas Gleixner wrote:

> On Mon, 2005-01-31 at 11:14 -0500, Robert P. J. Day wrote:
> > > > -p, --pad[=SIZE] Pad output to SIZE bytes with 0xFF. If SIZE is
> > > >                         not specified, the output is padded to the
> > > > 			end of the final erase block
> >
> > at the moment, this is not being followed.  for instance, mkfs.jffs2
> > has the --pad=SIZE option, where a simple number is treated as KiB.
> > anyway, you get idea -- it's pretty confusing.
>
> ???
>
> It's just missing the k and M suffixes. So its easy to fix.

  while this isn't related to MTD, i thought i'd toss it out since i
just tripped over it in looking at the source for mkfs.jffs2.c.  that
utility uses the getopt_long() routine to parse arguments, and the
long_options array that defines the possible args starts with:

static struct option long_options[] = {
    {"pad", 2, NULL, 'p'},
    {"root", 1, NULL, 'r'},
    ....

that first entry ostensibly means that the "pad" parameter has an
optional argument.

  however, i was not aware that, defined that way, you *must* specify
that option as, say, "-p262144" and not "-p 262144".  i had never
noticed that before, and it strikes me as horribly non-intuitive.

  anyway, just an observation.  now i'll shut up and get back to
patching.

rday






More information about the linux-mtd mailing list