From b3e1965ed65fd39203b8d392e2f91a4c5f70926b Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Tue, 17 Feb 2015 19:50:00 +0100 Subject: [PATCH] libfstools: extroot: support builtin block Fix regression introduced with migration to fs-tools. The old ubox based exroot did a fall back to /sbin/block if $cfg/sbin/block did not exist. Signed-off-by: Jo-Philipp Wich --- libfstools/extroot.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libfstools/extroot.c b/libfstools/extroot.c index 45cc3f5..ca38ce1 100644 --- a/libfstools/extroot.c +++ b/libfstools/extroot.c @@ -42,8 +42,11 @@ int mount_extroot(void) sprintf(ldlib_path, "%s/lib", extroot_prefix); sprintf(block_path, "%s/sbin/block", extroot_prefix); - if (stat(block_path, &s)) - return -1; + if (stat(block_path, &s)) { + sprintf(block_path, "/sbin/block"); + if (stat(block_path, &s)) + return -1; + } sprintf(kmod_loader, "/sbin/kmodloader %s/etc/modules-boot.d/ %s", extroot_prefix, extroot_prefix); system(kmod_loader); -- 2.11.0