block: fix ubi?_? glob pattern
authorDaniel Golle <daniel@makrotopia.org>
Wed, 20 Jul 2016 23:20:10 +0000 (01:20 +0200)
committerDaniel Golle <daniel@makrotopia.org>
Wed, 20 Jul 2016 23:38:33 +0000 (01:38 +0200)
The glob pattern intended for ubi?_? devices was matching
ubiblock?_? devices as well. Change the glob to actually return only
ubi devices.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
block.c

diff --git a/block.c b/block.c
index 13992f2..4d823e6 100644 (file)
--- a/block.c
+++ b/block.c
@@ -506,7 +506,7 @@ static void cache_load(int mtd)
        if (mtd) {
                _cache_load("/dev/mtdblock*");
                _cache_load("/dev/ubiblock*");
        if (mtd) {
                _cache_load("/dev/mtdblock*");
                _cache_load("/dev/ubiblock*");
-               _cache_load("/dev/ubi?*_?*");
+               _cache_load("/dev/ubi[0-9]*");
        }
        _cache_load("/dev/mmcblk*");
        _cache_load("/dev/sd*");
        }
        _cache_load("/dev/mmcblk*");
        _cache_load("/dev/sd*");