diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-06-24 21:01:22 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-06-24 21:01:22 +0200 |
commit | 47be5f0742caf56d38b41ae97dff21303d3ed264 (patch) | |
tree | 27ea77b6b67d0a43aa021df8934d6af260083aea /src/fstab-generator | |
parent | 40472036cf467b80409d17d18bb28dd1314d93e8 (diff) |
fstab-generator: fix checking of fstab_node_to_udev_node() result
We have to check for OOM here, let's add that. There's really no point in
checking for path_is_absolute() on the result however, as there's no particular
reason why that should be refused. Also, we don't have similar checks for the
other mount devices the generator deals with, hence don't bother with it here
either. Let's remove that check.
(And it shouldn't return made-up errors like "-1" in this case anyway.)
Diffstat (limited to 'src/fstab-generator')
-rw-r--r-- | src/fstab-generator/fstab-generator.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c index 62e67e088b..26fccbe360 100644 --- a/src/fstab-generator/fstab-generator.c +++ b/src/fstab-generator/fstab-generator.c @@ -570,10 +570,8 @@ static int add_sysroot_usr_mount(void) { return 0; what = fstab_node_to_udev_node(arg_usr_what); - if (!path_is_absolute(what)) { - log_debug("Skipping entry what=%s where=/sysroot/usr type=%s", what, strna(arg_usr_fstype)); - return -1; - } + if (!what) + return log_oom(); if (!arg_usr_options) opts = arg_root_rw > 0 ? "rw" : "ro"; |