chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
efd1f26
)
generator: use fflush_and_check() where appropriate
author
Lennart Poettering
<lennart@poettering.net>
Fri, 15 May 2015 15:06:59 +0000
(17:06 +0200)
committer
Sven Eden
<yamakuzure@gmx.net>
Tue, 14 Mar 2017 08:56:11 +0000
(09:56 +0100)
src/shared/generator.c
patch
|
blob
|
history
diff --git
a/src/shared/generator.c
b/src/shared/generator.c
index d48b400b31535af16b9f7cad2570ad80c7668416..81284995f5ab1c2d58ecf68513756abcf72ee3f0 100644
(file)
--- a/
src/shared/generator.c
+++ b/
src/shared/generator.c
@@
-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;
}