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:
parent
39bd1fdf7a
commit
98eda38aed
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in New Issue