From: hschang Date: Wed, 2 Jul 2014 05:32:14 +0000 (+0900) Subject: [mtd-utils] update to 1.5.1 X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_openvuplus_3.0;a=commitdiff_plain;h=2fab0218ce1df15f2066f32ed7d0e94a0bd898fc [mtd-utils] update to 1.5.1 --- diff --git a/meta-openvuplus/recipes-devtools/mtd/files/mkfs.ubifs-allow-output-file-creation-on-different-device.patch b/meta-openvuplus/recipes-devtools/mtd/files/mkfs.ubifs-allow-output-file-creation-on-different-device.patch new file mode 100644 index 0000000..63f7ae2 --- /dev/null +++ b/meta-openvuplus/recipes-devtools/mtd/files/mkfs.ubifs-allow-output-file-creation-on-different-device.patch @@ -0,0 +1,36 @@ +diff --git a/mkfs.ubifs/mkfs.ubifs.c b/mkfs.ubifs/mkfs.ubifs.c +index f77e5e6..e002be5 100644 +--- a/mkfs.ubifs/mkfs.ubifs.c ++++ b/mkfs.ubifs/mkfs.ubifs.c +@@ -324,6 +324,22 @@ static int in_path(const char *dir_name, const char *file_name) + return ret; + } + ++/* ++ * same_device - determine if a file is on the same blockdevice as a directory. ++ * @dir_name: directory path name ++ * @file_name: file path name ++ */ ++static int same_device(const char *dir_name, const char *file_name) ++{ ++ struct stat stat1, stat2; ++ ++ if (stat(dir_name, &stat1) == -1) ++ return -1; ++ if (stat(file_name, &stat2) == -1) ++ return -1; ++ return stat1.st_dev == stat2.st_dev; ++} ++ + /** + * calc_min_log_lebs - calculate the minimum number of log LEBs needed. + * @max_bud_bytes: journal size (buds only) +@@ -376,7 +392,7 @@ static int validate_options(void) + + if (!output) + return err_msg("no output file or UBI volume specified"); +- if (root && in_path(root, output)) ++ if (root && same_device(root, output) && in_path(root, output)) + return err_msg("output file cannot be in the UBIFS root " + "directory"); + if (!is_power_of_2(c->min_io_size)) diff --git a/meta-openvuplus/recipes-devtools/mtd/mtd-utils-1.4.9/mkfs.ubifs-allow-output-file-creation-on-different-device.patch b/meta-openvuplus/recipes-devtools/mtd/mtd-utils-1.4.9/mkfs.ubifs-allow-output-file-creation-on-different-device.patch deleted file mode 100644 index 63f7ae2..0000000 --- a/meta-openvuplus/recipes-devtools/mtd/mtd-utils-1.4.9/mkfs.ubifs-allow-output-file-creation-on-different-device.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff --git a/mkfs.ubifs/mkfs.ubifs.c b/mkfs.ubifs/mkfs.ubifs.c -index f77e5e6..e002be5 100644 ---- a/mkfs.ubifs/mkfs.ubifs.c -+++ b/mkfs.ubifs/mkfs.ubifs.c -@@ -324,6 +324,22 @@ static int in_path(const char *dir_name, const char *file_name) - return ret; - } - -+/* -+ * same_device - determine if a file is on the same blockdevice as a directory. -+ * @dir_name: directory path name -+ * @file_name: file path name -+ */ -+static int same_device(const char *dir_name, const char *file_name) -+{ -+ struct stat stat1, stat2; -+ -+ if (stat(dir_name, &stat1) == -1) -+ return -1; -+ if (stat(file_name, &stat2) == -1) -+ return -1; -+ return stat1.st_dev == stat2.st_dev; -+} -+ - /** - * calc_min_log_lebs - calculate the minimum number of log LEBs needed. - * @max_bud_bytes: journal size (buds only) -@@ -376,7 +392,7 @@ static int validate_options(void) - - if (!output) - return err_msg("no output file or UBI volume specified"); -- if (root && in_path(root, output)) -+ if (root && same_device(root, output) && in_path(root, output)) - return err_msg("output file cannot be in the UBIFS root " - "directory"); - if (!is_power_of_2(c->min_io_size)) diff --git a/meta-openvuplus/recipes-devtools/mtd/mtd-utils_1.4.9.bbappend b/meta-openvuplus/recipes-devtools/mtd/mtd-utils_1.4.9.bbappend deleted file mode 100644 index 0701768..0000000 --- a/meta-openvuplus/recipes-devtools/mtd/mtd-utils_1.4.9.bbappend +++ /dev/null @@ -1,16 +0,0 @@ -PR .= "-vuplus2" - -FILESEXTRAPATHS_prepend := "${THISDIR}/${P}:" - -SRC_URI += "file://mkfs.ubifs-allow-output-file-creation-on-different-device.patch" - -PACKAGES_DYNAMIC = "mtd-utils-*" - -ALLOW_EMPTY_${PN} = "1" - -python populate_packages_prepend () { - debug_objs = d.expand('${sbindir}/.debug') - do_split_packages(d, debug_objs, '^(.*)$', 'mtd-utils-%s-dbg', 'mtd-util-dbg %s', recursive=False, match_path=True, prepend=True) - objs = d.expand('${sbindir}') - do_split_packages(d, objs, '^(.*)$', 'mtd-utils-%s', 'mtd-util %s', recursive=False, match_path=True, prepend=True) -} diff --git a/meta-openvuplus/recipes-devtools/mtd/mtd-utils_git.bbappend b/meta-openvuplus/recipes-devtools/mtd/mtd-utils_git.bbappend new file mode 100644 index 0000000..2d18940 --- /dev/null +++ b/meta-openvuplus/recipes-devtools/mtd/mtd-utils_git.bbappend @@ -0,0 +1,16 @@ +PR .= "-vuplus0" + +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +SRC_URI += "file://mkfs.ubifs-allow-output-file-creation-on-different-device.patch" + +PACKAGES_DYNAMIC = "mtd-utils-*" + +ALLOW_EMPTY_${PN} = "1" + +python populate_packages_prepend () { + debug_objs = d.expand('${sbindir}/.debug') + do_split_packages(d, debug_objs, '^(.*)$', 'mtd-utils-%s-dbg', 'mtd-util-dbg %s', recursive=False, match_path=True, prepend=True) + objs = d.expand('${sbindir}') + do_split_packages(d, objs, '^(.*)$', 'mtd-utils-%s', 'mtd-util %s', recursive=False, match_path=True, prepend=True) +}