Skip to content

Commit

Permalink
call chase_symlinks without the /sysroot prefix (#6411)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
haraldh authored and keszybz committed Jul 20, 2017
1 parent 39bd1fd commit 98eda38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/fstab-generator/fstab-generator.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit 98eda38

Please sign in to comment.