diff options
author | Christian Lamparter <chunkeey@gmail.com> | 2018-06-07 23:30:14 +0200 |
---|---|---|
committer | John Crispin <john@phrozen.org> | 2018-06-08 09:33:44 +0200 |
commit | 48c5d6ab77b94cc0648f2c408f9480dd3885c508 (patch) | |
tree | a1347e45f76b30a69597784afd6ebd2ed0fc1e7d /package/utils | |
parent | b8a5fc207a4f25db4571cdacecd771a536133416 (diff) | |
download | mtk-20170518-48c5d6ab77b94cc0648f2c408f9480dd3885c508.zip mtk-20170518-48c5d6ab77b94cc0648f2c408f9480dd3885c508.tar.gz mtk-20170518-48c5d6ab77b94cc0648f2c408f9480dd3885c508.tar.bz2 |
mtd-utils: revert faulty upstream patch for now
Some of the ubi-tools in the upstream mtd-utils have been
broken by a bad patch upstream. It causes major breakage
during sysupgrade when the kernel, rootfs, ... volumes
are deleted in the wrong order.
This patch therefore reverts the faulty upstream commit which
fixes the bug.
linux-mtd mailing-list thread:
<http://lists.infradead.org/pipermail/linux-mtd/2018-June/081562.html>
Cc: John Crispin <john@phrozen.org>
Reported-by: L. Wayne Leach <LLeachii@aol.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
(cherry picked from commit daf19649dbf101ce7ae17abf84eeed7a30b41275)
Diffstat (limited to 'package/utils')
-rw-r--r-- | package/utils/mtd-utils/patches/200-Revert-Return-correct-error-number-in-ubi_get_vol_in.patch | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/package/utils/mtd-utils/patches/200-Revert-Return-correct-error-number-in-ubi_get_vol_in.patch b/package/utils/mtd-utils/patches/200-Revert-Return-correct-error-number-in-ubi_get_vol_in.patch new file mode 100644 index 0000000..79695c4 --- /dev/null +++ b/package/utils/mtd-utils/patches/200-Revert-Return-correct-error-number-in-ubi_get_vol_in.patch @@ -0,0 +1,30 @@ +From 7d27becbb355853ba778e8b83fe171eecb8195d2 Mon Sep 17 00:00:00 2001 +From: Christian Lamparter <chunkeey@gmail.com> +Date: Thu, 7 Jun 2018 22:36:19 +0200 +Subject: [PATCH] Revert "Return correct error number in ubi_get_vol_info1" + +This reverts commit dede98ffb706676309488d7cc660f569548d5930. +--- + lib/libubi.c | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +diff --git a/lib/libubi.c b/lib/libubi.c +index b50e68a..978b433 100644 +--- a/lib/libubi.c ++++ b/lib/libubi.c +@@ -1240,11 +1240,8 @@ int ubi_get_vol_info1(libubi_t desc, int dev_num, int vol_id, + info->dev_num = dev_num; + info->vol_id = vol_id; + +- if (vol_get_major(lib, dev_num, vol_id, &info->major, &info->minor)) { +- if (errno == ENOENT) +- errno = ENODEV; ++ if (vol_get_major(lib, dev_num, vol_id, &info->major, &info->minor)) + return -1; +- } + + ret = vol_read_data(lib->vol_type, dev_num, vol_id, buf, 50); + if (ret < 0) +-- +2.17.1 + |