summaryrefslogtreecommitdiffstats
path: root/src/fstab-generator
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2022-07-13 18:58:15 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2022-07-15 15:48:05 +0200
commitefc5fd3d72b51a7c32822f19515d0624b7a286e0 (patch)
tree3af2a74bdc1c4aca46009d86bb25ffb8c2176731 /src/fstab-generator
parentgenerators: only redirect logging when invoked by systemd (diff)
downloadsystemd-efc5fd3d72b51a7c32822f19515d0624b7a286e0.tar.xz
systemd-efc5fd3d72b51a7c32822f19515d0624b7a286e0.zip
fstab-generator: use path_equal() to detect alternate spellings of /usr
In the initrd we would treat e.g. "/usr/" as different from "/usr", which doesn't seem right.
Diffstat (limited to 'src/fstab-generator')
-rw-r--r--src/fstab-generator/fstab-generator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c
index 75523d0c07..046ca421ef 100644
--- a/src/fstab-generator/fstab-generator.c
+++ b/src/fstab-generator/fstab-generator.c
@@ -188,7 +188,7 @@ static bool mount_in_initrd(struct mntent *me) {
assert(me);
return fstab_test_option(me->mnt_opts, "x-initrd.mount\0") ||
- streq(me->mnt_dir, "/usr");
+ path_equal(me->mnt_dir, "/usr");
}
static int write_timeout(