summaryrefslogtreecommitdiff
path: root/src/shared/label.h
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2022-09-13 03:30:34 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2022-09-14 06:22:09 +0900
commit590d81002bbce1a1bcce21056d12873fb96ee3a9 (patch)
tree361e80b7ad8eef8ac2ca4ba43a9eebf029e294fb /src/shared/label.h
parent449375d2adadb0ce7a8975876ca797ae4f926e48 (diff)
downloadsystemd-590d81002bbce1a1bcce21056d12873fb96ee3a9.tar.gz
fs-util,label: introduce symlink_atomic_full() and symlink_atomic_full_label()
These new functions optionally create symlink of relative path.
Diffstat (limited to 'src/shared/label.h')
-rw-r--r--src/shared/label.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/shared/label.h b/src/shared/label.h
index 88aa47b7b8..2f899e2bdd 100644
--- a/src/shared/label.h
+++ b/src/shared/label.h
@@ -17,7 +17,10 @@ static inline int label_fix(const char *path, LabelFixFlags flags) {
}
int symlink_label(const char *old_path, const char *new_path);
-int symlink_atomic_label(const char *from, const char *to);
+int symlink_atomic_full_label(const char *from, const char *to, bool make_relative);
+static inline int symlink_atomic_label(const char *from, const char *to) {
+ return symlink_atomic_full_label(from, to, false);
+}
int mknod_label(const char *pathname, mode_t mode, dev_t dev);
int btrfs_subvol_make_label(const char *path);