diff options
author | Harald Hoyer <harald@hoyer.xyz> | 2017-07-20 19:13:09 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-07-20 13:13:09 -0400 |
commit | 98eda38aed6a10c4f6d6ad0cac6e5361e87de52b (patch) | |
tree | 4cd26c16a4f8b771339ef9b90db62a7e5b3f277c /src/fstab-generator | |
parent | 39bd1fdf7a3dc21ee4be6effa864b6f734c3010e (diff) | |
download | systemd-98eda38aed6a10c4f6d6ad0cac6e5361e87de52b.tar.gz |
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.
Diffstat (limited to 'src/fstab-generator')
-rw-r--r-- | src/fstab-generator/fstab-generator.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c index ea5ceb39ca..8fc4c8d179 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(); |