]>
git.ipfire.org Git - thirdparty/systemd.git/blob - src/basic/chattr-util.h
1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
6 #include "missing_fs.h"
8 /* The chattr() flags to apply when creating a new file *before* writing to it. In particular, flags such as
9 * FS_NOCOW_FL don't work if applied a-posteriori. All other flags are fine (or even necessary, think
10 * FS_IMMUTABLE_FL!) to apply after writing to the files. */
11 #define CHATTR_EARLY_FL \
18 #define CHATTR_ALL_FL \
27 FS_JOURNAL_DATA_FL | \
35 int chattr_fd(int fd
, unsigned value
, unsigned mask
, unsigned *previous
);
36 int chattr_path(const char *p
, unsigned value
, unsigned mask
, unsigned *previous
);
38 int read_attr_fd(int fd
, unsigned *ret
);
39 int read_attr_path(const char *p
, unsigned *ret
);