mtd-utils: revert faulty upstream patch for now
[openwrt/openwrt.git] / package / utils / mtd-utils / patches / 200-Revert-Return-correct-error-number-in-ubi_get_vol_in.patch
1 From 7d27becbb355853ba778e8b83fe171eecb8195d2 Mon Sep 17 00:00:00 2001
2 From: Christian Lamparter <chunkeey@gmail.com>
3 Date: Thu, 7 Jun 2018 22:36:19 +0200
4 Subject: [PATCH] Revert "Return correct error number in ubi_get_vol_info1"
5
6 This reverts commit dede98ffb706676309488d7cc660f569548d5930.
7 ---
8 lib/libubi.c | 5 +----
9 1 file changed, 1 insertion(+), 4 deletions(-)
10
11 diff --git a/lib/libubi.c b/lib/libubi.c
12 index b50e68a..978b433 100644
13 --- a/lib/libubi.c
14 +++ b/lib/libubi.c
15 @@ -1240,11 +1240,8 @@ int ubi_get_vol_info1(libubi_t desc, int dev_num, int vol_id,
16 info->dev_num = dev_num;
17 info->vol_id = vol_id;
18
19 - if (vol_get_major(lib, dev_num, vol_id, &info->major, &info->minor)) {
20 - if (errno == ENOENT)
21 - errno = ENODEV;
22 + if (vol_get_major(lib, dev_num, vol_id, &info->major, &info->minor))
23 return -1;
24 - }
25
26 ret = vol_read_data(lib->vol_type, dev_num, vol_id, buf, 50);
27 if (ret < 0)
28 --
29 2.17.1
30