mirror of
https://github.com/systemd/systemd
synced 2024-07-23 03:04:57 +00: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 a new issue