From: Jo-Philipp Wich Date: Tue, 17 Feb 2015 18:50:00 +0000 (+0100) Subject: libfstools: extroot: support builtin block X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b3e1965ed65fd39203b8d392e2f91a4c5f70926b;p=oweals%2Ffstools.git 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 --- 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);