summaryrefslogtreecommitdiff
path: root/src/shared/mount-util.h
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-06-21 19:44:35 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-06-23 10:34:58 +0200
commit9c6535367d07650bb531beb6cce57497862a36da (patch)
treeb1d70708e39b8bb4c214816582a7ddbdf56b3b8b /src/shared/mount-util.h
parentf69c2926f896d628426447f2a0a81bfcd1f4a75d (diff)
downloadsystemd-9c6535367d07650bb531beb6cce57497862a36da.tar.gz
basic,shared: move make_mount_point_inode_*() to shared/
Those pull in selinux for labelling, and we should avoid selinux in basic/.
Diffstat (limited to 'src/shared/mount-util.h')
-rw-r--r--src/shared/mount-util.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/shared/mount-util.h b/src/shared/mount-util.h
index 0169083980..36501c2c4a 100644
--- a/src/shared/mount-util.h
+++ b/src/shared/mount-util.h
@@ -3,6 +3,7 @@
#include <mntent.h>
#include <stdio.h>
+#include <sys/stat.h>
#include <unistd.h>
#include "alloc-util.h"
@@ -108,3 +109,7 @@ int mount_image_in_namespace(pid_t target, const char *propagate_path, const cha
int make_mount_point(const char *path);
int remount_idmap(const char *p, uid_t uid_shift, uid_t uid_range);
+
+/* Creates a mount point (not parents) based on the source path or stat - ie, a file or a directory */
+int make_mount_point_inode_from_stat(const struct stat *st, const char *dest, mode_t mode);
+int make_mount_point_inode_from_path(const char *source, const char *dest, mode_t mode);