1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
2 #pragma once
3
4 #include <fcntl.h>
5 #include <stdbool.h>
6 #include <sys/types.h>
7
8 typedef enum LabelFixFlags {
9 LABEL_IGNORE_ENOENT = 1 << 0,
10 LABEL_IGNORE_EROFS = 1 << 1,
11 } LabelFixFlags;
12
13 int label_fix_container(const char *path, const char *inside_path, LabelFixFlags flags);
label_fix(const char * path,LabelFixFlags flags)14 static inline int label_fix(const char *path, LabelFixFlags flags) {
15 return label_fix_container(path, path, flags);
16 }
17
18 int symlink_label(const char *old_path, const char *new_path);
19 int symlink_atomic_label(const char *from, const char *to);
20 int mknod_label(const char *pathname, mode_t mode, dev_t dev);
21
22 int btrfs_subvol_make_label(const char *path);
23