From: Zbigniew Jędrzejewski-Szmek Date: Wed, 13 Jul 2022 16:58:15 +0000 (+0200) Subject: fstab-generator: use path_equal() to detect alternate spellings of /usr X-Git-Tag: v252-rc1~627^2~6 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=efc5fd3d72b51a7c32822f19515d0624b7a286e0;p=thirdparty%2Fsystemd.git 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. --- diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c index 75523d0c079..046ca421ef7 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(