summaryrefslogtreecommitdiff
path: root/src/core/swap.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-09-27 22:02:04 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-09-29 11:08:12 -0400
commit4f52d3fe2da7c3449b7fbfaa7c64a83354d3b56c (patch)
tree77b1151f030bb5e92b5718ef56a3f2db397c211d /src/core/swap.c
parent86b23b07c96b185126bfbf217227dad362a20c25 (diff)
fstab-generator: properly deal with discard as non-last option
Previous code would only return correct results when discard was the last option. While at it, avoid incorrect behaviour for (invalid) 'pri' option not followed by '=...', and also do not return -1 as the error code.
Diffstat (limited to 'src/core/swap.c')
-rw-r--r--src/core/swap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/swap.c b/src/core/swap.c
index 2e12824049..36c9e029e9 100644
--- a/src/core/swap.c
+++ b/src/core/swap.c
@@ -610,7 +610,7 @@ static void swap_dump(Unit *u, FILE *f, const char *prefix) {
prefix, p->priority,
prefix, yes_no(p->noauto),
prefix, yes_no(p->nofail),
- prefix, p->discard);
+ prefix, p->discard ?: "none");
if (s->control_pid > 0)
fprintf(f,