1 From c7b2630c9154722e2295f3dbfbb19f3305676ecf Mon Sep 17 00:00:00 2001
2 From: Harald Hoyer <harald@redhat.com>
3 Date: Thu, 20 Jul 2017 13:38:46 +0200
4 Subject: [PATCH] call chase_symlinks without the /sysroot prefix
6 In case fstab-generator is called in the initrd, chase_symlinks()
7 returns with a canonical path "/sysroot/sysroot/<mountpoint>", if the
8 "/sysroot" prefix is present in the path.
10 This patch skips the "/sysroot" prefix for the chase_symlinks() call,
11 because "/sysroot" is already the root directory and chase_symlinks()
12 prepends the root directory in the canonical path returned.
14 src/fstab-generator/fstab-generator.c | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
17 diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c
18 index ea5ceb39ca..8fc4c8d179 100644
19 --- a/src/fstab-generator/fstab-generator.c
20 +++ b/src/fstab-generator/fstab-generator.c
21 @@ -526,7 +526,7 @@ static int parse_fstab(bool initrd) {
25 - where = initrd ? strappend("/sysroot/", me->mnt_dir) : strdup(me->mnt_dir);
26 + where = strdup(me->mnt_dir);