summaryrefslogtreecommitdiffstats
path: root/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc
diff options
context:
space:
mode:
Diffstat (limited to 'meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc')
-rw-r--r--meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/Makefile.patch27
-rw-r--r--meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/libiniparser.c.patch13
-rw-r--r--meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/libubi.c.patch13
-rw-r--r--meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/ubiformat.c.patch30
4 files changed, 69 insertions, 14 deletions
diff --git a/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/Makefile.patch b/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/Makefile.patch
index 2802afe7b..b7dad878b 100644
--- a/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/Makefile.patch
+++ b/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/Makefile.patch
@@ -1,6 +1,6 @@
1--- a/Makefile 2012-04-29 18:15:30.000000000 +0200 1--- a/Makefile 2012-05-01 19:46:47.000000000 +0200
2+++ b/Makefile 2012-04-29 00:43:03.000000000 +0200 2+++ b/Makefile 2012-05-01 19:48:01.000000000 +0200
3@@ -16,27 +16,11 @@ 3@@ -16,27 +16,13 @@
4 4
5 TESTS = tests 5 TESTS = tests
6 6
@@ -13,16 +13,14 @@
13- rfddump rfdformat \ 13- rfddump rfdformat \
14- serve_image recv_image \ 14- serve_image recv_image \
15- sumtool jffs2reader 15- sumtool jffs2reader
16-UBI_BINS = \ 16 UBI_BINS = \
17- ubiupdatevol ubimkvol ubirmvol ubicrc32 ubinfo ubiattach \ 17 ubiupdatevol ubimkvol ubirmvol ubicrc32 ubinfo ubiattach \
18- ubidetach ubinize ubiformat ubirename mtdinfo ubirsvol 18 ubidetach ubinize ubiformat ubirename mtdinfo ubirsvol
19- 19
20-BINS = $(MTD_BINS) 20-BINS = $(MTD_BINS)
21-BINS += mkfs.ubifs/mkfs.ubifs 21-BINS += mkfs.ubifs/mkfs.ubifs
22-BINS += $(addprefix ubi-utils/,$(UBI_BINS)) 22-BINS += $(addprefix ubi-utils/,$(UBI_BINS))
23-SCRIPTS = flash_eraseall 23-SCRIPTS = flash_eraseall
24+UBI_BINS = ubiupdatevol ubimkvol ubirmvol ubinfo ubiattach ubidetach ubirename mtdinfo ubirsvol
25+
26+BINS = $(addprefix ubi-utils/,$(UBI_BINS)) 24+BINS = $(addprefix ubi-utils/,$(UBI_BINS))
27 25
28 TARGETS = $(BINS) 26 TARGETS = $(BINS)
@@ -31,7 +29,7 @@
31 29
32 OBJDEPS = $(BUILDDIR)/include/version.h 30 OBJDEPS = $(BUILDDIR)/include/version.h
33 31
34@@ -58,7 +42,7 @@ 32@@ -58,12 +44,9 @@
35 rm -f $(BUILDDIR)/include/version.h 33 rm -f $(BUILDDIR)/include/version.h
36 $(MAKE) -C $(TESTS) clean 34 $(MAKE) -C $(TESTS) clean
37 35
@@ -39,8 +37,13 @@
39+install:: $(addprefix $(BUILDDIR)/,${BINS}) 37+install:: $(addprefix $(BUILDDIR)/,${BINS})
40 mkdir -p ${DESTDIR}/${SBINDIR} 38 mkdir -p ${DESTDIR}/${SBINDIR}
41 install -m 0755 $^ ${DESTDIR}/${SBINDIR}/ 39 install -m 0755 $^ ${DESTDIR}/${SBINDIR}/
42 mkdir -p ${DESTDIR}/${MANDIR}/man1 40- mkdir -p ${DESTDIR}/${MANDIR}/man1
43@@ -88,7 +72,6 @@ 41- install -m 0644 mkfs.jffs2.1 ${DESTDIR}/${MANDIR}/man1/
42- -gzip -9f ${DESTDIR}/${MANDIR}/man1/*.1
43
44 tests::
45 $(MAKE) -C $(TESTS)
46@@ -88,7 +71,6 @@
44 LDFLAGS_jffs2reader = $(ZLIBLDFLAGS) $(LZOLDFLAGS) 47 LDFLAGS_jffs2reader = $(ZLIBLDFLAGS) $(LZOLDFLAGS)
45 LDLIBS_jffs2reader = -lz $(LZOLDLIBS) 48 LDLIBS_jffs2reader = -lz $(LZOLDLIBS)
46 49
diff --git a/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/libiniparser.c.patch b/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/libiniparser.c.patch
new file mode 100644
index 000000000..8be8ac32a
--- /dev/null
+++ b/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/libiniparser.c.patch
@@ -0,0 +1,13 @@
1--- a/ubi-utils/libiniparser.c 2012-04-30 23:59:40.000000000 +0200
2+++ b/ubi-utils/libiniparser.c 2012-04-30 23:55:15.000000000 +0200
3@@ -333,7 +333,9 @@
4
5 str = iniparser_getstring(d, key, INI_INVALID_KEY);
6 if (str==INI_INVALID_KEY) return notfound ;
7- return atof(str);
8+ double value;
9+ sscanf(str,"%lf",&value);
10+ return value;
11 }
12
13 /*-------------------------------------------------------------------------*/
diff --git a/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/libubi.c.patch b/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/libubi.c.patch
index e60385904..97c4fa3ab 100644
--- a/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/libubi.c.patch
+++ b/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/libubi.c.patch
@@ -1,5 +1,5 @@
1--- a/ubi-utils/libubi.c 2012-04-29 21:44:52.000000000 +0200 1--- a/ubi-utils/libubi.c 2012-05-01 01:57:51.000000000 +0200
2+++ b/ubi-utils/libubi.c 2012-04-29 21:43:52.000000000 +0200 2+++ b/ubi-utils/libubi.c 2012-05-01 01:55:14.000000000 +0200
3@@ -36,6 +36,26 @@ 3@@ -36,6 +36,26 @@
4 #include "libubi_int.h" 4 #include "libubi_int.h"
5 #include "common.h" 5 #include "common.h"
@@ -49,6 +49,15 @@
49 49
50 if (minor != 0) { 50 if (minor != 0) {
51 errno = EINVAL; 51 errno = EINVAL;
52@@ -686,7 +706,7 @@
53 * success and %-1 in case of failure. @r->ubi_num contains newly created UBI
54 * device number.
55 */
56-static int do_attach(const char *node, const struct ubi_attach_req *r)
57+static int do_attach(const char *node, struct ubi_attach_req *r)
58 {
59 int fd, ret;
60
52@@ -757,8 +777,8 @@ 61@@ -757,8 +777,8 @@
53 mtd_dev_node); 62 mtd_dev_node);
54 } 63 }
diff --git a/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/ubiformat.c.patch b/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/ubiformat.c.patch
new file mode 100644
index 000000000..7539d76e3
--- /dev/null
+++ b/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/ubiformat.c.patch
@@ -0,0 +1,30 @@
1--- a/ubi-utils/ubiformat.c 2012-05-03 01:14:39.000000000 +0200
2+++ b/ubi-utils/ubiformat.c 2012-05-03 01:00:57.000000000 +0200
3@@ -246,7 +246,11 @@
4
5 while (1) {
6 normsg_cont("continue? (yes/no) ");
7- if (scanf("%3s", buf) == EOF) {
8+
9+ fflush(stderr);
10+ fflush(stdout);
11+
12+ if (fgets(buf,4,stdin) == NULL) {
13 sys_errmsg("scanf returned unexpected EOF, assume \"yes\"");
14 return 1;
15 }
16@@ -259,10 +263,13 @@
17
18 static int answer_is_yes(void)
19 {
20+ fflush(stderr);
21+ fflush(stdout);
22+
23 char buf[4];
24
25 while (1) {
26- if (scanf("%3s", buf) == EOF) {
27+ if (fgets(buf,4,stdin) == NULL) {
28 sys_errmsg("scanf returned unexpected EOF, assume \"no\"");
29 return 0;
30 }