public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* ubinize corrections
@ 2008-11-02 19:23 J. Scott Merritt
  2008-11-03  8:41 ` Adrian Hunter
  0 siblings, 1 reply; 4+ messages in thread
From: J. Scott Merritt @ 2008-11-02 19:23 UTC (permalink / raw)
  To: linux-mtd

Dear list,

I believe that I have stumbled upon two problems with the latest version
of ubinize.c in mtd-utils - one serious, and one not so serious.

- First, the easy one: At line 457, I believe that we should be printing
args.subpage_size rather than ui.min_io_size.

- More seriously, I believe that the "flags" field in the ubigen_vol_info
structures is not being properly initialized.  Line 494 allocates memory
for these structures with malloc, so they are not cleared to zero.  The
read_section function updates the flag field if the AUTO-RESIZE flag is
specified, but does not otherwise initialize or clear it.

I reckon the latter problem could be repaired either with calloc, or by
modifying read_section to more directly set/clear the flag.

Thanks, Scott.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-11-06  7:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-02 19:23 ubinize corrections J. Scott Merritt
2008-11-03  8:41 ` Adrian Hunter
2008-11-03 16:49   ` J. Scott Merritt
2008-11-06  7:13   ` Artem Bityutskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox