Use fflush_and_check() in more places

This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2015-05-16 18:11:32 -04:00
parent 0dfb89d3c2
commit 4652c56c59
3 changed files with 15 additions and 15 deletions
+3 -3
View File
@@ -176,9 +176,9 @@ static int create_disk(
"ExecStartPost=/sbin/mkswap '/dev/mapper/%s'\n",
name);
fflush(f);
if (ferror(f))
return log_error_errno(errno, "Failed to write file %s: %m", p);
r = fflush_and_check(f);
if (r < 0)
return log_error_errno(r, "Failed to write file %s: %m", p);
from = strjoina("../", n);