fstab-generator: add comma when removed option is in the middle

xxx,x-systemd.default-timeout=y,zzz was filtered to xxxzzz,
but should be xxx,zzz, of course.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2014-07-07 16:10:38 -04:00
parent c9fa3670bf
commit 36a259d22c
1 changed files with 1 additions and 1 deletions

View File

@ -125,7 +125,7 @@ int generator_write_timeouts(const char *dir, const char *what, const char *wher
char *prefix, *postfix;
prefix = strndupa(opts, start - opts - (start != opts));
postfix = timeout + len + (timeout[len] != '\0');
postfix = timeout + len + (start == opts && timeout[len] != '\0');
*filtered = strjoin(prefix, *postfix ? postfix : NULL, NULL);
if (!*filtered)
return log_oom();