[PATCH 1/2] mkfs.ubifs: UBI I/O Library

Corentin Chary corentin.chary at gmail.com
Fri May 8 09:58:36 EDT 2009

On Fri, May 8, 2009 at 2:20 PM, Artem Bityutskiy <dedekind at infradead.org> wrote:
> On Fri, 2009-05-08 at 14:07 +0200, Corentin Chary wrote:
>> No, not really, libubiio provide what you can find in ubi.h, nothing
>> more (open/close/read/write/change/erase/map/unmap).
>> There some code in common to read sysfs properties, it's all.
>> There is libubiio_int.h with some duplicate code from
>> ubi-utils/src/common.h which could be removed.
>> libubi on the other hand provide functions to manipulate volume and
>> devices (rename, create, etc..).
> Still, what's the reason to have a separate library?
> Why not to add your stuff to existing  one? If there
> are some issues in libubi, they could be fixed. I just
> see a lot of common code.

When we made libubiio we wanted something close to the kernel API,
libubi is not.
To make mkfs.ubifs works with smaller changes, I can add the
"is_mapped" and "erase" functions to libubi, forgetting the original
Does that seems better to you ? If it's ok then I'll do that.

>> But the current tree/build system make it hard to share code between
>> ubi-utils/mtd-utils/mkfs. It what
>> If you check, there is also three crc32.c/h in mtd-utils ...
>> (See http://git.iksaif.net/?p=users/iksaif/mtd-utils.git;a=tree;hb=HEAD
>> to check what a clean tree could be)
> But surely you may try to re-arrange the tree, make it saner?
It's what I did on my git tree.. but it only works with CMake.
I don't know how to fix the current mess with simples Makefiles.
Maybe someone with better Make skills could help us here ?

Corentin Chary

More information about the linux-mtd mailing list