summaryrefslogtreecommitdiff
path: root/src/journal/journal-file.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-12-24 16:39:55 +0100
committerLennart Poettering <lennart@poettering.net>2014-12-24 16:53:04 +0100
commit4a4d89b682d2a8d32e899c4b47950f64df74fb7c (patch)
treea76ee43721157dbbbe53ce1bd0c2db000ab6689f /src/journal/journal-file.c
parentde33fc625725d199629ed074d6278504deb23deb (diff)
util: make creation time xattr logic more generic
Diffstat (limited to 'src/journal/journal-file.c')
-rw-r--r--src/journal/journal-file.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
index fec54f31b9..48c27ee627 100644
--- a/src/journal/journal-file.c
+++ b/src/journal/journal-file.c
@@ -26,7 +26,6 @@
#include <sys/statvfs.h>
#include <fcntl.h>
#include <stddef.h>
-#include <sys/xattr.h>
#include "journal-def.h"
#include "journal-file.h"
@@ -2526,8 +2525,6 @@ int journal_file_open(
}
if (f->last_stat.st_size == 0 && f->writable) {
- uint64_t crtime;
-
/* Let's attach the creation time to the journal file,
* so that the vacuuming code knows the age of this
* file even if the file might end up corrupted one
@@ -2538,8 +2535,7 @@ int journal_file_open(
* attributes are not supported we'll just skip this,
* and rely solely on mtime/atime/ctime of the file. */
- crtime = htole64((uint64_t) now(CLOCK_REALTIME));
- fsetxattr(f->fd, "user.crtime_usec", &crtime, sizeof(crtime), XATTR_CREATE);
+ fd_setcrtime(f->fd, now(CLOCK_REALTIME));
#ifdef HAVE_GCRYPT
/* Try to load the FSPRG state, and if we can't, then