summaryrefslogtreecommitdiff
path: root/src/fstab-generator
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-06-24 21:00:11 +0200
committerLennart Poettering <lennart@poettering.net>2016-06-24 21:00:11 +0200
commit40472036cf467b80409d17d18bb28dd1314d93e8 (patch)
treec9b2365040af2b33780668d226ea1e28340c0733 /src/fstab-generator
parente34e72fb18b6a14c43c71db34dc4fd983383a71a (diff)
fstab-generator: document why we copy the root device into the usr device if unset
Let's a comment about this, to avoid questions popping up like in #2344.
Diffstat (limited to 'src/fstab-generator')
-rw-r--r--src/fstab-generator/fstab-generator.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c
index daf50706c7..62e67e088b 100644
--- a/src/fstab-generator/fstab-generator.c
+++ b/src/fstab-generator/fstab-generator.c
@@ -548,22 +548,20 @@ static int add_sysroot_usr_mount(void) {
return 0;
if (arg_root_what && !arg_usr_what) {
+ /* Copy over the root device, in case the /usr mount just differs in a mount option (consider btrfs subvolumes) */
arg_usr_what = strdup(arg_root_what);
-
if (!arg_usr_what)
return log_oom();
}
if (arg_root_fstype && !arg_usr_fstype) {
arg_usr_fstype = strdup(arg_root_fstype);
-
if (!arg_usr_fstype)
return log_oom();
}
if (arg_root_options && !arg_usr_options) {
arg_usr_options = strdup(arg_root_options);
-
if (!arg_usr_options)
return log_oom();
}