return cached;
}
-static int add_sysusr_sysroot_usr_bind_mount(const char *source) {
+static int add_sysusr_sysroot_usr_bind_mount(const char *source, bool validatefs) {
+ log_debug("Synthesizing entry what=/sysusr/usr where=/sysroot/usr opts=bind validatefs=%s", yes_no(validatefs));
+
return add_mount(source,
arg_dest,
"/sysusr/usr",
/* fstype= */ NULL,
"bind",
/* passno= */ 0,
- /* flags= */ 0,
+ validatefs ? MOUNT_VALIDATEFS : 0,
SPECIAL_INITRD_FS_TARGET,
/* extra_after= */ NULL);
}
fstype,
options,
passno,
- flags,
+ flags & ~(is_sysroot_usr ? MOUNT_VALIDATEFS : 0),
target_unit,
/* extra_after= */ NULL);
if (r <= 0)
return r;
if (is_sysroot_usr) {
- log_debug("Synthesizing fstab entry what=/sysusr/usr where=/sysroot/usr opts=bind");
- r = add_sysusr_sysroot_usr_bind_mount(source);
+ r = add_sysusr_sysroot_usr_bind_mount(source, flags & MOUNT_VALIDATEFS);
if (r < 0)
return r;
}
if (r < 0)
return r;
- log_debug("Synthesizing entry what=/sysusr/usr where=/sysroot/usr opts=bind");
-
- r = add_sysusr_sysroot_usr_bind_mount("/proc/cmdline");
+ r = add_sysusr_sysroot_usr_bind_mount("/proc/cmdline", /* validatefs = */ false);
if (r < 0)
return r;
"/dev/disk/by-designator/usr",
in_initrd() ? "/sysusr/usr" : "/usr",
arg_usr_fstype,
- (in_initrd() ? MOUNT_VALIDATEFS : 0),
+ /* flags = */ 0,
options,
"/usr/ Partition",
in_initrd() ? SPECIAL_INITRD_USR_FS_TARGET : SPECIAL_LOCAL_FS_TARGET);
"/sysusr/usr",
"/sysroot/usr",
/* fstype= */ NULL,
- /* flags= */ 0,
+ MOUNT_VALIDATEFS,
"bind",
"/usr/ Partition (Final)",
SPECIAL_INITRD_FS_TARGET);