diff options
| author | Andrea Adami <andrea.adami@gmail.com> | 2012-04-29 22:51:33 +0000 |
|---|---|---|
| committer | Koen Kooi <koen@dominion.thruhere.net> | 2012-04-30 10:16:17 +0200 |
| commit | 00bf241a99aab5003993fb2107d72f02b7377470 (patch) | |
| tree | 06d01a8584d2629553bb1daee714ab07040536fc /meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/libubi.c.patch | |
| parent | 8f9b2e3a102e66426ce5b269a6827fc6a3218bef (diff) | |
| download | meta-openembedded-00bf241a99aab5003993fb2107d72f02b7377470.tar.gz | |
ubi-utils-klibc: initial commit of version 1.4.9
* Initially only ubiattach was targeted (for kexecboot project).
* Based on klibc_1.5.25, will be revised once new klibc is out.
Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
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.patch | 73 |
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 0000000000..e60385904b --- /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; | ||
