make block handle the same block device types as luci
authorJohn Crispin <blogic@openwrt.org>
Thu, 11 Jul 2013 16:31:40 +0000 (18:31 +0200)
committerJohn Crispin <blogic@openwrt.org>
Thu, 11 Jul 2013 16:31:40 +0000 (18:31 +0200)
Signed-off-by: John Crispin <blogic@openwrt.org>
block.c

diff --git a/block.c b/block.c
index 18c9299961a4b55aa12ae98521a3c65e9bb20bf5..ea142481b0c03b749220060beb1c01a993e8a098 100644 (file)
--- a/block.c
+++ b/block.c
@@ -344,6 +344,8 @@ static void cache_load(int mtd)
                _cache_load("/dev/mtdblock*");
        _cache_load("/dev/mmcblk*");
        _cache_load("/dev/sd*");
+       _cache_load("/dev/sdc*");
+       _cache_load("/dev/hd*");
 }
 
 static int print_block_info(struct blkid_struct_probe *pr)
@@ -377,7 +379,7 @@ static int print_block_uci(struct blkid_struct_probe *pr)
        if (pr->uuid[0])
                printf("\toption\tuuid\t'%s'\n", pr->uuid);
        else
-               printf("\toption\tdevice\t'%s'\n", basename(pr->dev));
+               printf("\toption\tdevice\t'%s'\n", pr->dev);
        printf("\toption\tenabled\t'0'\n\n");
 
        return 0;