diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-03-28 02:26:33 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-03-28 02:26:33 +0900 |
commit | 4c3d2523a0ec8a075652d8b8a80787747576e03f (patch) | |
tree | a03bf0bfdfe05dbc3e193752d2faced343947ca4 /src/journal-remote/journal-remote-write.h | |
parent | a065dcd239e9219112ad131aa3cef060a666b377 (diff) | |
download | systemd-4c3d2523a0ec8a075652d8b8a80787747576e03f.tar.gz |
journal-remote: make writer_new() return negative errno on failure
After f12b399dd6362a03379cb769954ebfb9972236ed, writer_new() may fail
with non-OOM error. Let's return the error cause, and logs the failure
in the caller side.
This also drops logs in journal_remote_get_writer(), adds its caller
typically logs the failure.
Diffstat (limited to 'src/journal-remote/journal-remote-write.h')
-rw-r--r-- | src/journal-remote/journal-remote-write.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/journal-remote/journal-remote-write.h b/src/journal-remote/journal-remote-write.h index c140f6cba3..55513d9bf7 100644 --- a/src/journal-remote/journal-remote-write.h +++ b/src/journal-remote/journal-remote-write.h @@ -20,7 +20,7 @@ typedef struct Writer { unsigned n_ref; } Writer; -Writer* writer_new(RemoteServer* server); +int writer_new(RemoteServer *server, Writer **ret); Writer* writer_ref(Writer *w); Writer* writer_unref(Writer *w); |