X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fshared%2Flogs-show.c;h=d3ee1398806223c594457fcbc1baa1f9e6a05a3d;hp=c2495056d77005f809557b0e6d7cf9949d9ce7f1;hb=a6dcc7e5924f9c27d3e9c6560a448b02ec28b65f;hpb=0a6f50c0afdfc434b492493bd9efab20cbee8623 diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c index c2495056d..d3ee13988 100644 --- a/src/shared/logs-show.c +++ b/src/shared/logs-show.c @@ -20,9 +20,7 @@ ***/ #include -#include #include -#include #include #include #include @@ -32,7 +30,6 @@ #include "util.h" #include "utf8.h" #include "hashmap.h" -#include "fileio.h" #include "journal-internal.h" /* up to three lines (each up to 100 characters), @@ -1166,9 +1163,9 @@ static int get_boot_id_for_machine(const char *machine, sd_id128_t *boot_id) { if (fd < 0) _exit(EXIT_FAILURE); - k = loop_read(fd, buf, 36, false); + r = loop_read_exact(fd, buf, 36, false); safe_close(fd); - if (k != 36) + if (k < 0) _exit(EXIT_FAILURE); k = send(pair[1], buf, 36, MSG_NOSIGNAL);