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,
|
what,
|
||||||
device);
|
device);
|
||||||
|
|
||||||
fflush(f);
|
r = fflush_and_check(f);
|
||||||
if (ferror(f))
|
if (r < 0)
|
||||||
return log_error_errno(errno, "Failed to write unit file %s: %m", unit);
|
return log_error_errno(r, "Failed to write unit file %s: %m", unit);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user