From: Jo-Philipp Wich Date: Wed, 6 Nov 2013 12:54:16 +0000 (+0000) Subject: block: support extroot and overlay mounts by device X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fubox.git;a=commitdiff_plain;h=0588218d4bc58b0e099272338decbe4734f5678b;ds=inline block: support extroot and overlay mounts by device --- diff --git a/block.c b/block.c index aa37e24..74e4d96 100644 --- a/block.c +++ b/block.c @@ -525,7 +525,7 @@ static struct blkid_struct_probe* find_block_info(char *uuid, char *label, char 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 +872,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)) {