shared/fstab-util: teach fstab_filter_options() a mode where all values are returned

Apart from tests, the new argument isn't used anywhere, so there should be no
functional change. Note that the two arms of the big conditional are switched, so the
diff is artificially inflated. The actual code change is rather small. I dropped the
path which extracts ret_value manually, because it wasn't supporting unescaping of the
escape character properly.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2021-03-11 11:25:15 +01:00
parent 0264b404b9
commit ff0c31bc27
7 changed files with 164 additions and 116 deletions
+1 -1
View File
@@ -215,7 +215,7 @@ int generator_write_timeouts(
r = fstab_filter_options(opts, "comment=systemd.device-timeout\0"
"x-systemd.device-timeout\0",
NULL, &timeout, filtered);
NULL, &timeout, NULL, filtered);
if (r < 0) {
log_warning_errno(r, "Failed to parse fstab options, ignoring: %m");
return 0;