From: Harald Hoyer Date: Thu, 20 Jul 2017 17:13:09 +0000 (+0200) Subject: call chase_symlinks without the /sysroot prefix (#6411) X-Git-Tag: v235~309 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=98eda38aed6a10c4f6d6ad0cac6e5361e87de52b;p=thirdparty%2Fsystemd.git call chase_symlinks without the /sysroot prefix (#6411) In case fstab-generator is called in the initrd, chase_symlinks() returns with a canonical path "/sysroot/sysroot/", if the "/sysroot" prefix is present in the path. This patch skips the "/sysroot" prefix for the chase_symlinks() call, because "/sysroot" is already the root directory and chase_symlinks() prepends the root directory in the canonical path returned. --- diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c index ea5ceb39ca6..8fc4c8d179e 100644 --- a/src/fstab-generator/fstab-generator.c +++ b/src/fstab-generator/fstab-generator.c @@ -526,7 +526,7 @@ static int parse_fstab(bool initrd) { continue; } - where = initrd ? strappend("/sysroot/", me->mnt_dir) : strdup(me->mnt_dir); + where = strdup(me->mnt_dir); if (!where) return log_oom();