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/<mountpoint>", 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.
This commit is contained in:
Harald Hoyer 2017-07-20 19:13:09 +02:00 committed by Zbigniew Jędrzejewski-Szmek
parent 39bd1fdf7a
commit 98eda38aed
1 changed files with 1 additions and 1 deletions

View File

@ -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();