summaryrefslogtreecommitdiff
path: root/ubi-utils
diff options
context:
space:
mode:
Diffstat (limited to 'ubi-utils')
-rw-r--r--ubi-utils/include/libubi.h2
-rw-r--r--ubi-utils/include/libubigen.h2
-rw-r--r--ubi-utils/old-tools/src/pfi2bin.c4
-rw-r--r--ubi-utils/old-tools/src/unubi.c4
-rw-r--r--ubi-utils/src/libubigen.c2
5 files changed, 7 insertions, 7 deletions
diff --git a/ubi-utils/include/libubi.h b/ubi-utils/include/libubi.h
index 0cdb67c..61d886f 100644
--- a/ubi-utils/include/libubi.h
+++ b/ubi-utils/include/libubi.h
@@ -23,9 +23,9 @@
#ifndef __LIBUBI_H__
#define __LIBUBI_H__
+#include <ctype.h>
#include <stdint.h>
#include <mtd/ubi-user.h>
-#include <ctype.h>
#include <mtd/ubi-header.h>
#ifdef __cplusplus
diff --git a/ubi-utils/include/libubigen.h b/ubi-utils/include/libubigen.h
index f5c7616..1b659b5 100644
--- a/ubi-utils/include/libubigen.h
+++ b/ubi-utils/include/libubigen.h
@@ -27,7 +27,7 @@
#include <stdint.h>
#include <stdio.h>
-#include <asm/byteorder.h>
+#include <endian.h>
#ifdef __cplusplus
extern "C" {
diff --git a/ubi-utils/old-tools/src/pfi2bin.c b/ubi-utils/old-tools/src/pfi2bin.c
index 7f31938..fc16760 100644
--- a/ubi-utils/old-tools/src/pfi2bin.c
+++ b/ubi-utils/old-tools/src/pfi2bin.c
@@ -359,7 +359,7 @@ write_ubi_volume_table(pdd_data_t pdd, list_t raw_pebs,
* introduce this stupid mechanism. Until no final
* decision of the VTAB structure is made... Good enough.
*/
- rc = ubigen_create(&u, UBI_LAYOUT_VOL_ID, UBI_VID_DYNAMIC,
+ rc = ubigen_create(&u, UBI_LAYOUT_VOLUME_ID, UBI_VID_DYNAMIC,
pdd->eb_size, DEFAULT_ERASE_COUNT,
1, UBI_VERSION,
pdd->vid_hdr_offset, UBI_COMPAT_REJECT,
@@ -389,7 +389,7 @@ write_ubi_volume_table(pdd_data_t pdd, list_t raw_pebs,
memcpy(ptr, vol_tab, vol_tab_size_limit);
fp_leb = my_fmemopen(ptr, leb_size, "r");
- rc = ubigen_create(&u, UBI_LAYOUT_VOL_ID, UBI_VID_DYNAMIC,
+ rc = ubigen_create(&u, UBI_LAYOUT_VOLUME_ID, UBI_VID_DYNAMIC,
pdd->eb_size, DEFAULT_ERASE_COUNT,
1, UBI_VERSION, pdd->vid_hdr_offset,
UBI_COMPAT_REJECT, leb_size * UBI_LAYOUT_VOLUME_EBS,
diff --git a/ubi-utils/old-tools/src/unubi.c b/ubi-utils/old-tools/src/unubi.c
index 5c1d324..8d16192 100644
--- a/ubi-utils/old-tools/src/unubi.c
+++ b/ubi-utils/old-tools/src/unubi.c
@@ -431,7 +431,7 @@ extract_itable(FILE *fpin, struct eb_info *cur, size_t bsize, size_t num,
fseek(fpin, __be32_to_cpu(cur->ec.data_offset), SEEK_CUR);
/* prepare output file */
- if (__be32_to_cpu(cur->vid.vol_id) != UBI_LAYOUT_VOL_ID)
+ if (__be32_to_cpu(cur->vid.vol_id) != UBI_LAYOUT_VOLUME_ID)
return -2;
memset(filename, 0, MAXPATH + 1);
snprintf(filename, MAXPATH, FN_VITBL, path, num);
@@ -771,7 +771,7 @@ unubi_volumes(FILE* fpin, uint32_t *vols, size_t vc, struct args *a)
/* extract info-table */
if (a->itable &&
- (__be32_to_cpu(cur->vid.vol_id) == UBI_LAYOUT_VOL_ID)) {
+ (__be32_to_cpu(cur->vid.vol_id) == UBI_LAYOUT_VOLUME_ID)) {
extract_itable(fpin, cur, a->bsize,
itable_num, a->odir_path);
itable_num++;
diff --git a/ubi-utils/src/libubigen.c b/ubi-utils/src/libubigen.c
index 83cea91..ff7602e 100644
--- a/ubi-utils/src/libubigen.c
+++ b/ubi-utils/src/libubigen.c
@@ -302,7 +302,7 @@ int ubigen_write_layout_vol(const struct ubigen_info *ui,
size = UBI_MAX_VOLUMES * UBI_VTBL_RECORD_SIZE;
vi.bytes = ui->leb_size * UBI_LAYOUT_VOLUME_EBS;
- vi.id = UBI_LAYOUT_VOL_ID;
+ vi.id = UBI_LAYOUT_VOLUME_ID;
vi.alignment = 1;
vi.data_pad = 0;
vi.usable_leb_size = ui->leb_size;