chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
systemctl: allow globbing in commands which take multiple unit names
[elogind.git]
/
src
/
journal
/
journald-stream.c
diff --git
a/src/journal/journald-stream.c
b/src/journal/journald-stream.c
index 8958c7f3dec8f1734c124e830b5343fa00d9ce33..c032ee4a0ef2c2fd66f72cc05171bb36c29fb3f8 100644
(file)
--- a/
src/journal/journald-stream.c
+++ b/
src/journal/journald-stream.c
@@
-293,7
+293,6
@@
static int stdout_stream_process(sd_event_source *es, int fd, uint32_t revents,
if ((revents|EPOLLIN|EPOLLHUP) != (EPOLLIN|EPOLLHUP)) {
log_error("Got invalid event from epoll for stdout stream: %"PRIx32, revents);
if ((revents|EPOLLIN|EPOLLHUP) != (EPOLLIN|EPOLLHUP)) {
log_error("Got invalid event from epoll for stdout stream: %"PRIx32, revents);
- r = -EIO;
goto terminate;
}
goto terminate;
}
@@
-304,12
+303,11
@@
static int stdout_stream_process(sd_event_source *es, int fd, uint32_t revents,
return 0;
log_warning("Failed to read from stream: %m");
return 0;
log_warning("Failed to read from stream: %m");
- r = -errno;
goto terminate;
}
if (l == 0) {
goto terminate;
}
if (l == 0) {
-
r =
stdout_stream_scan(s, true);
+ stdout_stream_scan(s, true);
goto terminate;
}
goto terminate;
}
@@
-356,7
+354,6
@@
static int stdout_stream_new(sd_event_source *es, int listen_fd, uint32_t revent
Server *s = userdata;
StdoutStream *stream;
int fd, r;
Server *s = userdata;
StdoutStream *stream;
int fd, r;
- socklen_t len;
assert(s);
assert(s);
@@
-388,10
+385,9
@@
static int stdout_stream_new(sd_event_source *es, int listen_fd, uint32_t revent
stream->fd = fd;
stream->fd = fd;
-
len = sizeof(
stream->ucred);
- if (
getsockopt(fd, SOL_SOCKET, SO_PEERCRED, &stream->ucred, &len)
< 0) {
+
r = getpeercred(fd, &
stream->ucred);
+ if (
r
< 0) {
log_error("Failed to determine peer credentials: %m");
log_error("Failed to determine peer credentials: %m");
- r = -errno;
goto fail;
}
goto fail;
}
@@
-404,7
+400,6
@@
static int stdout_stream_new(sd_event_source *es, int listen_fd, uint32_t revent
if (shutdown(fd, SHUT_WR) < 0) {
log_error("Failed to shutdown writing side of socket: %m");
if (shutdown(fd, SHUT_WR) < 0) {
log_error("Failed to shutdown writing side of socket: %m");
- r = -errno;
goto fail;
}
goto fail;
}
@@
-428,7
+423,7
@@
static int stdout_stream_new(sd_event_source *es, int listen_fd, uint32_t revent
fail:
stdout_stream_free(stream);
fail:
stdout_stream_free(stream);
- return
r
;
+ return
0
;
}
int server_open_stdout_socket(Server *s) {
}
int server_open_stdout_socket(Server *s) {