fstab-generator: properly deal with discard as non-last option
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 28 Sep 2014 02:02:04 +0000 (22:02 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 29 Sep 2014 15:08:12 +0000 (11:08 -0400)
commit4f52d3fe2da7c3449b7fbfaa7c64a83354d3b56c
tree77b1151f030bb5e92b5718ef56a3f2db397c211d
parent86b23b07c96b185126bfbf217227dad362a20c25
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.
src/core/swap.c
src/fstab-generator/fstab-generator.c