Age | Commit message (Collapse) | Author |
|
When fail to write to PEBs, and the error is EIO, torture the
PEB before marking it as bad. Basically, the code is copied
from the kernel UBI.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Not-so-old linux kernel like 2.6.29 do already have "/sys/class/mtd/mtdX"
directories, while very old kernels do not. But in 2.6.29 these
directories do not contain any information.
Anyway, the logic in libmtd which checked whether the system
supports sysfs was broken, because it assumed that old systems
do not even have "/sys/class/mtd/" directory.
Fix this problem by checking for "/sys/class/mtd/mtdX/name". If this
is present - the system really has sysfs support.
This patch also adds an extra print to libmtd.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
This patch contains changes similar to the ones in the previous
patch.
Also, it changes all invocations of memset and makes sure
the argument is 0, not '\0', because memset expects int,
not char.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
This large commit makes several things.
1. Switches libmtd to use the new sysfs interface
2. Implements new handy 'mtdinfo' utility
3. Does minore amendmends in libubi and some ubi-tools.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
This is a prepearation to the coming sysfs interface support.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
This is a preparation for the coming sysfs support.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
This is a preparation for the coming sysfs support.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
This is a preparation for the coming sysfs support.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Rename 'struct mtd_info' to 'struct mtd_dev_info' to reflect the
fact that it provides information about a specific MTD device.
Also, this is more consistent with libubi.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Rename 'mtd_get_info()' into 'mtd_get_dev_info()' to be consistent
to libubi.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Remove the fd field from the mtd information data structure,
because libmtd does not really know the device node file name,
and serves only as a place to save the descriptor. The callers
should find a better place.
This patch improves code readability and prepares for further
changes.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Just for the sake of being consistent with libubi, move the
comments for API functions to the header file.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Signed-off-by: Roger Quadros <ext-roger.quadros@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Few minor amendments by Artem. And increase the utility
version number.
Signed-off-by: Roger Quadros <ext-roger.quadros@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Move new-utils to ubi-utils and old ones to ubi-utils/old-utils.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|