summaryrefslogtreecommitdiff
path: root/src/journal
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-04-08 20:47:35 +0200
committerLennart Poettering <lennart@poettering.net>2015-04-08 20:47:35 +0200
commit1ed8f8c16da99551c6731764759878a0bc243fde (patch)
treee374c9701d1f6217e77b056b52401c02d59755eb /src/journal
parent171181bcd64d5a128f6678107d18ffa1c9388b94 (diff)
util: merge change_attr_fd() and chattr_fd()
Diffstat (limited to 'src/journal')
-rw-r--r--src/journal/journal-file.c4
-rw-r--r--src/journal/journalctl.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
index 5a4e7cbd7d..6bbcc6d777 100644
--- a/src/journal/journal-file.c
+++ b/src/journal/journal-file.c
@@ -149,7 +149,7 @@ void journal_file_close(JournalFile *f) {
* reenable all the good bits COW usually provides
* (such as data checksumming). */
- (void) chattr_fd(f->fd, false, FS_NOCOW_FL);
+ (void) chattr_fd(f->fd, 0, FS_NOCOW_FL);
(void) btrfs_defrag_fd(f->fd);
}
@@ -2608,7 +2608,7 @@ int journal_file_open(
* the expense of data integrity features (which
* shouldn't be too bad, given that we do our own
* checksumming). */
- r = chattr_fd(f->fd, true, FS_NOCOW_FL);
+ r = chattr_fd(f->fd, FS_NOCOW_FL, FS_NOCOW_FL);
if (r < 0 && r != -ENOTTY)
log_warning_errno(r, "Failed to set file attributes: %m");
diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
index b4f88bcd0a..40c84b9ba5 100644
--- a/src/journal/journalctl.c
+++ b/src/journal/journalctl.c
@@ -1377,7 +1377,7 @@ static int setup_keys(void) {
/* Enable secure remove, exclusion from dump, synchronous
* writing and in-place updating */
- r = chattr_fd(fd, true, FS_SECRM_FL|FS_NODUMP_FL|FS_SYNC_FL|FS_NOCOW_FL);
+ r = chattr_fd(fd, FS_SECRM_FL|FS_NODUMP_FL|FS_SYNC_FL|FS_NOCOW_FL, FS_SECRM_FL|FS_NODUMP_FL|FS_SYNC_FL|FS_NOCOW_FL);
if (r < 0)
log_warning_errno(errno, "Failed to set file attributes: %m");