summaryrefslogtreecommitdiffstats
path: root/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/libubi.c.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/libubi.c.patch')
-rw-r--r--meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/libubi.c.patch73
1 files changed, 73 insertions, 0 deletions
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
new file mode 100644
index 000000000..e60385904
--- /dev/null
+++ b/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/libubi.c.patch
@@ -0,0 +1,73 @@
1--- a/ubi-utils/libubi.c 2012-04-29 21:44:52.000000000 +0200
2+++ b/ubi-utils/libubi.c 2012-04-29 21:43:52.000000000 +0200
3@@ -36,6 +36,26 @@
4 #include "libubi_int.h"
5 #include "common.h"
6
7+/* parts of mtd/ubi-user.h */
8+
9+/* Set an UBI volume property */
10+#define UBI_IOCSETPROP _IOW(UBI_VOL_IOC_MAGIC, 6, struct ubi_set_prop_req)
11+
12+/**
13+ * struct ubi_set_prop_req - a data structure used to set an ubi volume
14+ * property.
15+ * @property: property to set (%UBI_PROP_DIRECT_WRITE)
16+ * @padding: reserved for future, not used, has to be zeroed
17+ * @value: value to set
18+ */
19+struct ubi_set_prop_req {
20+ uint8_t property;
21+ uint8_t padding[7];
22+ uint64_t value;
23+} __attribute__ ((packed));
24+
25+/* end parts of mtd/ubi-user.h */
26+
27 /**
28 * mkpath - compose full path from 2 given components.
29 * @path: the first component
30@@ -382,8 +402,8 @@
31 return errmsg("\"%s\" is not a character device", node);
32 }
33
34- major = major(st.st_rdev);
35- minor = minor(st.st_rdev);
36+ major = __major(st.st_rdev);
37+ minor = __minor(st.st_rdev);
38
39 if (minor == 0) {
40 errno = EINVAL;
41@@ -448,8 +468,8 @@
42 return errmsg("\"%s\" is not a character device", node);
43 }
44
45- major = major(st.st_rdev);
46- minor = minor(st.st_rdev);
47+ major = __major(st.st_rdev);
48+ minor = __minor(st.st_rdev);
49
50 if (minor != 0) {
51 errno = EINVAL;
52@@ -757,8 +777,8 @@
53 mtd_dev_node);
54 }
55
56- major = major(sb.st_rdev);
57- minor = minor(sb.st_rdev);
58+ major = __major(sb.st_rdev);
59+ minor = __minor(sb.st_rdev);
60
61 if (major != MTD_CHAR_MAJOR) {
62 errno = EINVAL;
63@@ -866,8 +886,8 @@
64 return -1;
65 }
66
67- major = major(st.st_rdev);
68- minor = minor(st.st_rdev);
69+ major = __major(st.st_rdev);
70+ minor = __minor(st.st_rdev);
71
72 if (ubi_get_info((libubi_t *)lib, &info))
73 return -1;