X-Git-Url: http://git.openwrt.org/?p=project%2Fubox.git;a=blobdiff_plain;f=block.c;h=7a55461a0da006ababa8a2c20ddaf6e68bfab388;hp=941e4b825944aec08ff2667b9937cf1c48b5a7f4;hb=71ea854364833c5dcb0800e092b45fed2c45910e;hpb=32f0efdf83999146cb3ad491e432f44c8655f907 diff --git a/block.c b/block.c index 941e4b8..7a55461 100644 --- a/block.c +++ b/block.c @@ -466,7 +466,6 @@ 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*"); _cache_load("/dev/md*"); _cache_load("/dev/mapper/*"); @@ -520,12 +519,12 @@ static struct blkid_struct_probe* find_block_info(char *uuid, char *label, char if (label) list_for_each_entry(pr, &devices, list) - if (strcmp(pr->label, label)) + if (!strcmp(pr->label, label)) return pr; if (path) list_for_each_entry(pr, &devices, list) - if (!strcmp(pr->dev, path)) + if (!strcmp(basename(pr->dev), basename(path))) return pr; return NULL; @@ -872,14 +871,14 @@ static int mount_extroot(char *cfg) if (!m || !m->extroot) return -1; - pr = find_block_info(m->uuid, m->label, NULL); + pr = find_block_info(m->uuid, m->label, m->device); if (!pr && delay_root){ fprintf(stderr, "extroot: is not ready yet, retrying in %u seconds\n", delay_root); sleep(delay_root); mkblkdev(); cache_load(0); - pr = find_block_info(m->uuid, m->label, NULL); + pr = find_block_info(m->uuid, m->label, m->device); } if (pr) { if (strncmp(pr->id->name, "ext", 3)) {