core: swap priority can be negative

Negative priorities are useful for swap targets which should be only used as
last resort.
This commit is contained in:
Topi Miettinen
2019-12-04 08:57:08 +01:00
committed by Zbigniew Jędrzejewski-Szmek
parent 09e4b620e7
commit 7477451b69
4 changed files with 13 additions and 11 deletions
+3
View File
@@ -100,6 +100,9 @@ static void test_fstab_find_pri(void) {
assert_se(fstab_find_pri("pri=11", &pri) == 1);
assert_se(pri == 11);
assert_se(fstab_find_pri("pri=-2", &pri) == 1);
assert_se(pri == -2);
assert_se(fstab_find_pri("opt,pri=12,opt", &pri) == 1);
assert_se(pri == 12);