diff options
author | Martin Pitt <martin.pitt@ubuntu.com> | 2015-08-01 13:02:32 +0200 |
---|---|---|
committer | Martin Pitt <martin.pitt@ubuntu.com> | 2015-08-01 13:02:32 +0200 |
commit | 5fd56512f6dafa50adc03548e61c221f383e635e (patch) | |
tree | ce5f40367e3dd1122ab0cb045080b4f1d3b3fb79 /src/shared/ask-password-api.c | |
parent | 7035cd9e226bce7909e1365039431a4d21e21045 (diff) | |
download | systemd-5fd56512f6dafa50adc03548e61c221f383e635e.tar.gz |
Imported Upstream version 224
Diffstat (limited to 'src/shared/ask-password-api.c')
-rw-r--r-- | src/shared/ask-password-api.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/shared/ask-password-api.c b/src/shared/ask-password-api.c index 3941605cec..ca4c24ebde 100644 --- a/src/shared/ask-password-api.c +++ b/src/shared/ask-password-api.c @@ -382,11 +382,9 @@ int ask_password_agent( if (id) fprintf(f, "Id=%s\n", id); - fflush(f); - - if (ferror(f)) { - log_error_errno(errno, "Failed to write query file: %m"); - r = -errno; + r = fflush_and_check(f); + if (r < 0) { + log_error_errno(r, "Failed to write query file: %m"); goto finish; } |