]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
fstab-generator: use path_equal() to detect alternate spellings of /usr
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 13 Jul 2022 16:58:15 +0000 (18:58 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 15 Jul 2022 13:48:05 +0000 (15:48 +0200)
In the initrd we would treat e.g. "/usr/" as different from "/usr", which
doesn't seem right.

src/fstab-generator/fstab-generator.c

index 75523d0c07925a382a0022efb52f720e73d1ded4..046ca421ef74b6c202066ace0eba9d098b7b51a2 100644 (file)
@@ -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(