chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
util: fix typo
[elogind.git]
/
src
/
shared
/
logs-show.c
diff --git
a/src/shared/logs-show.c
b/src/shared/logs-show.c
index c2495056d77005f809557b0e6d7cf9949d9ce7f1..27f407229fe24cde11772d6c21ac7e26de3d235b 100644
(file)
--- a/
src/shared/logs-show.c
+++ b/
src/shared/logs-show.c
@@
-20,9
+20,7
@@
***/
#include <time.h>
***/
#include <time.h>
-#include <assert.h>
#include <errno.h>
#include <errno.h>
-#include <poll.h>
#include <sys/socket.h>
#include <string.h>
#include <fcntl.h>
#include <sys/socket.h>
#include <string.h>
#include <fcntl.h>
@@
-32,8
+30,10
@@
#include "util.h"
#include "utf8.h"
#include "hashmap.h"
#include "util.h"
#include "utf8.h"
#include "hashmap.h"
-#include "fileio.h"
#include "journal-internal.h"
#include "journal-internal.h"
+#include "formats-util.h"
+#include "process-util.h"
+#include "terminal-util.h"
/* up to three lines (each up to 100 characters),
or 300 characters, whichever is less */
/* up to three lines (each up to 100 characters),
or 300 characters, whichever is less */
@@
-993,7
+993,7
@@
static int show_journal(FILE *f,
if (warn_cutoff && line < how_many && not_before > 0) {
sd_id128_t boot_id;
if (warn_cutoff && line < how_many && not_before > 0) {
sd_id128_t boot_id;
- usec_t cutoff;
+ usec_t cutoff
= 0
;
/* Check whether the cutoff line is too early */
/* Check whether the cutoff line is too early */
@@
-1166,9
+1166,9
@@
static int get_boot_id_for_machine(const char *machine, sd_id128_t *boot_id) {
if (fd < 0)
_exit(EXIT_FAILURE);
if (fd < 0)
_exit(EXIT_FAILURE);
-
k = loop_read
(fd, buf, 36, false);
+
r = loop_read_exact
(fd, buf, 36, false);
safe_close(fd);
safe_close(fd);
- if (
k != 36
)
+ if (
r < 0
)
_exit(EXIT_FAILURE);
k = send(pair[1], buf, 36, MSG_NOSIGNAL);
_exit(EXIT_FAILURE);
k = send(pair[1], buf, 36, MSG_NOSIGNAL);