From: John Crispin Date: Thu, 11 Jul 2013 16:31:40 +0000 (+0200) Subject: make block handle the same block device types as luci X-Git-Url: http://git.openwrt.org/?p=project%2Fubox.git;a=commitdiff_plain;h=c897416adf05299d57e9ba25a8ea2bc628675c5f;ds=sidebyside make block handle the same block device types as luci Signed-off-by: John Crispin --- diff --git a/block.c b/block.c index 18c9299..ea14248 100644 --- 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;