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;
return;
j->on_network =
- (long)sfs.f_type == (long)CIFS_MAGIC_NUMBER ||
- sfs.f_type == CODA_SUPER_MAGIC ||
- sfs.f_type == NCP_SUPER_MAGIC ||
- sfs.f_type == NFS_SUPER_MAGIC ||
- sfs.f_type == SMB_SUPER_MAGIC;
+ 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;
}
static int add_file(sd_journal *j, const char *prefix, const char *filename) {
- char _cleanup_free_ *path = NULL;
+ _cleanup_free_ char *path = NULL;
int r;
JournalFile *f;
}
static int add_directory(sd_journal *j, const char *prefix, const char *dirname) {
- char _cleanup_free_ *path = NULL;
+ _cleanup_free_ char *path = NULL;
int r;
- DIR _cleanup_closedir_ *d = NULL;
+ _cleanup_closedir_ DIR *d = NULL;
sd_id128_t id, mid;
Directory *m;
}
static int add_root_directory(sd_journal *j, const char *p) {
- DIR _cleanup_closedir_ *d = NULL;
+ _cleanup_closedir_ DIR *d = NULL;
Directory *m;
int r;