summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-11-26 21:24:08 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-11-26 21:24:08 -0500
commite0d8c8015a089e9a8e971be5ebe2139bb714c10a (patch)
tree67de405f7efa9c8a5190297481000544e765bdf8 /src
parent90c739259fc35feb773b953d61f75790cacf6b15 (diff)
parent0d3d3be1e225d51ebf46fb40a89419eb6a7d334e (diff)
Merge commit 'pr/2036^^'
Diffstat (limited to 'src')
-rw-r--r--src/fstab-generator/fstab-generator.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c
index f7c8d11ace..87b8b77f22 100644
--- a/src/fstab-generator/fstab-generator.c
+++ b/src/fstab-generator/fstab-generator.c
@@ -248,6 +248,7 @@ static int add_mount(
assert(what);
assert(where);
assert(opts);
+ assert(post);
assert(source);
if (streq_ptr(fstype, "autofs"))
@@ -297,7 +298,7 @@ static int add_mount(
"Documentation=man:fstab(5) man:systemd-fstab-generator(8)\n",
source);
- if (post && !noauto && !nofail && !automount)
+ if (!noauto && !nofail && !automount)
fprintf(f, "Before=%s\n", post);
if (!automount && opts) {
@@ -337,7 +338,7 @@ static int add_mount(
if (r < 0)
return log_error_errno(r, "Failed to write unit file %s: %m", unit);
- if (!noauto && post) {
+ if (!noauto) {
lnk = strjoin(arg_dest, "/", post, nofail || automount ? ".wants/" : ".requires/", name, NULL);
if (!lnk)
return log_oom();
@@ -368,10 +369,7 @@ static int add_mount(
"Documentation=man:fstab(5) man:systemd-fstab-generator(8)\n",
source);
- if (post)
- fprintf(f,
- "Before=%s\n",
- post);
+ fprintf(f, "Before=%s\n", post);
if (opts) {
r = write_requires_after(f, opts);