ubi-utils-klibc: add the remaining ubicrc32, ubinize, ubiformat

* add more hacks to compile
* binaries tested on Zaurus poodle/corgi (with patched kernel)
* bump PR

* NOTES
* strange behavior wrt getopt for at least ubiformat:
* you should pass the options first, i.e.
* ubiformat -O 512 /dev/mtd3    *works*
* ubiformat /dev/mtd3 -O 512    *fails*

Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
This commit is contained in:
Andrea Adami
2012-05-02 23:53:00 +00:00
committed by Koen Kooi
parent 32d316edae
commit 3ba480f4b5
5 changed files with 84 additions and 31 deletions
@@ -1,5 +1,5 @@
--- a/ubi-utils/libubi.c 2012-04-29 21:44:52.000000000 +0200
+++ b/ubi-utils/libubi.c 2012-04-29 21:43:52.000000000 +0200
--- a/ubi-utils/libubi.c 2012-05-01 01:57:51.000000000 +0200
+++ b/ubi-utils/libubi.c 2012-05-01 01:55:14.000000000 +0200
@@ -36,6 +36,26 @@
#include "libubi_int.h"
#include "common.h"
@@ -49,6 +49,15 @@
if (minor != 0) {
errno = EINVAL;
@@ -686,7 +706,7 @@
* success and %-1 in case of failure. @r->ubi_num contains newly created UBI
* device number.
*/
-static int do_attach(const char *node, const struct ubi_attach_req *r)
+static int do_attach(const char *node, struct ubi_attach_req *r)
{
int fd, ret;
@@ -757,8 +777,8 @@
mtd_dev_node);
}