summaryrefslogtreecommitdiff
path: root/src/core/swap.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-03-13 21:21:46 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-03-13 23:42:17 -0400
commite64d523579dc6ed48db7ccdc5441c0adc33cd4e2 (patch)
treed922993a3923887f172b9ddc1ea62dee138d8ab2 /src/core/swap.c
parent8fa158e79d911294a18361eb6e674840e36a1a37 (diff)
core: print warning on invalid swap pri= field
CID #1264371.
Diffstat (limited to 'src/core/swap.c')
-rw-r--r--src/core/swap.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/core/swap.c b/src/core/swap.c
index bb1398f688..6b1bdb5c1e 100644
--- a/src/core/swap.c
+++ b/src/core/swap.c
@@ -724,8 +724,12 @@ static void swap_enter_activating(Swap *s) {
NULL, &discard, NULL);
priority = s->parameters_fragment.priority;
- if (priority < 0)
- fstab_find_pri(s->parameters_fragment.options, &priority);
+ if (priority < 0) {
+ r = fstab_find_pri(s->parameters_fragment.options, &priority);
+ if (r < 0)
+ log_notice_errno(r, "Failed to parse swap priority \"%s\", ignoring: %m",
+ s->parameters_fragment.options);
+ }
}
r = exec_command_set(s->control_command, "/sbin/swapon", NULL);