chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
journal: implement parallel traversal in client
[elogind.git]
/
src
/
journal
/
journalctl.c
diff --git
a/src/journal/journalctl.c
b/src/journal/journalctl.c
index 7bcd842f6db5db8d3a2a1c8c3b19497210a00512..5f17f45cac9e4a96ad490b0f375e66828ac0616f 100644
(file)
--- a/
src/journal/journalctl.c
+++ b/
src/journal/journalctl.c
@@
-23,7
+23,7
@@
#include <errno.h>
#include <stddef.h>
#include <errno.h>
#include <stddef.h>
-#include "journal-
privat
e.h"
+#include "journal-
fil
e.h"
int main(int argc, char *argv[]) {
int r;
int main(int argc, char *argv[]) {
int r;
@@
-62,21
+62,16
@@
int main(int argc, char *argv[]) {
uint64_t p, l;
p = le64toh(o->entry.items[i].object_offset);
uint64_t p, l;
p = le64toh(o->entry.items[i].object_offset);
- r = journal_file_move_to_object(f, p, &o);
+ r = journal_file_move_to_object(f, p,
OBJECT_DATA,
&o);
if (r < 0) {
log_error("Failed to move to data: %s", strerror(-r));
goto finish;
}
if (r < 0) {
log_error("Failed to move to data: %s", strerror(-r));
goto finish;
}
- if (le64toh(o->object.type) != OBJECT_DATA) {
- log_error("Invalid file");
- goto finish;
- }
-
l = o->object.size - offsetof(Object, data.payload);
printf("\t[%.*s]\n", (int) l, o->data.payload);
l = o->object.size - offsetof(Object, data.payload);
printf("\t[%.*s]\n", (int) l, o->data.payload);
- r = journal_file_move_to_object(f, offset, &o);
+ r = journal_file_move_to_object(f, offset,
OBJECT_ENTRY,
&o);
if (r < 0) {
log_error("Failed to move back to entry: %s", strerror(-r));
goto finish;
if (r < 0) {
log_error("Failed to move back to entry: %s", strerror(-r));
goto finish;