diff options
author | Mike Yuan <me@yhndnzj.com> | 2024-01-22 17:00:46 +0100 |
---|---|---|
committer | Mike Yuan <me@yhndnzj.com> | 2024-01-25 18:06:41 +0100 |
commit | 9f6c32ac964078130db0d2a175d319cdb9e3b2f9 (patch) | |
tree | 2a226653395d2dc50eecc49dc5501be70aa51c41 /src/fstab-generator | |
parent | fstab-generator: modernize write_extra_dependencies (diff) | |
download | systemd-9f6c32ac964078130db0d2a175d319cdb9e3b2f9.tar.xz systemd-9f6c32ac964078130db0d2a175d319cdb9e3b2f9.zip |
fstab-generator: drop unapplicable options for /usr/ too
We already drop these for /sysroot/usr/ in parse_fstab
(1e9b2e4fdd8d04e3fbfadbc0b92dc138c819c221). Let's make
things consistent, and do the same for /usr/ too (after
switch-root).
Diffstat (limited to 'src/fstab-generator')
-rw-r--r-- | src/fstab-generator/fstab-generator.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c index c7ac71bb23..3a1d2f38db 100644 --- a/src/fstab-generator/fstab-generator.c +++ b/src/fstab-generator/fstab-generator.c @@ -565,16 +565,16 @@ static int add_mount( if (r < 0) return r; - if (path_equal(where, "/")) { + if (PATH_IN_SET(where, "/", "/usr")) { r = mandatory_mount_drop_unapplicable_options(&flags, where, opts, &opts_root_filtered); if (r < 0) return r; opts = opts_root_filtered; if (!strv_isempty(wanted_by)) - log_debug("Ignoring 'x-systemd.wanted-by=' option for root device."); + log_debug("Ignoring 'x-systemd.wanted-by=' option for root/usr device."); if (!strv_isempty(required_by)) - log_debug("Ignoring 'x-systemd.required-by=' option for root device."); + log_debug("Ignoring 'x-systemd.required-by=' option for root/usr device."); required_by = strv_free(required_by); wanted_by = strv_free(wanted_by); |