X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fjournal%2Fsd-journal.c;h=15239b5688d8bde6743d80d13f3726b50ff6d77b;hb=bdd29249a882e599e5e365536372d08dee398cd4;hp=88af68c1f1a2c73d26d3856db786d7d9e96d9419;hpb=4826f0b7b5c0aefa08b8cc7ef64d69027f84da2c;p=elogind.git diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c index 88af68c1f..15239b568 100644 --- a/src/journal/sd-journal.c +++ b/src/journal/sd-journal.c @@ -109,6 +109,9 @@ static void set_location(sd_journal *j, LocationType type, JournalFile *f, Objec init_location(&j->current_location, type, f, o); + if (j->current_file) + j->current_file->current_offset = 0; + j->current_file = f; j->current_field = 0; @@ -1248,11 +1251,11 @@ static void check_network(sd_journal *j, int fd) { return; j->on_network = - sfs.f_type == (__SWORD_TYPE) CIFS_MAGIC_NUMBER || - sfs.f_type == (__SWORD_TYPE) CODA_SUPER_MAGIC || - sfs.f_type == (__SWORD_TYPE) NCP_SUPER_MAGIC || - sfs.f_type == (__SWORD_TYPE) NFS_SUPER_MAGIC || - sfs.f_type == (__SWORD_TYPE) SMB_SUPER_MAGIC; + F_TYPE_CMP(sfs.f_type, CIFS_MAGIC_NUMBER) || + F_TYPE_CMP(sfs.f_type, CODA_SUPER_MAGIC) || + F_TYPE_CMP(sfs.f_type, NCP_SUPER_MAGIC) || + F_TYPE_CMP(sfs.f_type, NFS_SUPER_MAGIC) || + F_TYPE_CMP(sfs.f_type, SMB_SUPER_MAGIC); } static int add_file(sd_journal *j, const char *prefix, const char *filename) {