From 0588218d4bc58b0e099272338decbe4734f5678b Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Wed, 6 Nov 2013 12:54:16 +0000 Subject: [PATCH] block: support extroot and overlay mounts by device --- block.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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)) { -- 2.25.1