mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-22 13:33:56 +03:00
generator: use fflush_and_check() where appropriate
This commit is contained in:
parent
a2c7f25aec
commit
2929b4a6ad
@ -67,9 +67,9 @@ static int write_fsck_sysroot_service(const char *dir, const char *what) {
|
||||
what,
|
||||
device);
|
||||
|
||||
fflush(f);
|
||||
if (ferror(f))
|
||||
return log_error_errno(errno, "Failed to write unit file %s: %m", unit);
|
||||
r = fflush_and_check(f);
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to write unit file %s: %m", unit);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user