summaryrefslogtreecommitdiff
path: root/src/shared/mount-setup.h
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2021-01-01 05:38:06 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2021-01-19 07:04:19 +0900
commitbac11cd667cca5545ab90e472dff77baf68d8e0b (patch)
tree4bb5bd592f6ff25d5df12fe28995e80ec1cb2a9f /src/shared/mount-setup.h
parent772e0a76f34914f6f81205e912e4744c6b23f704 (diff)
downloadsystemd-bac11cd667cca5545ab90e472dff77baf68d8e0b.tar.gz
core: move several source files to src/shared
As, the files are used by many executables, fstab-generator, remount-fs, machine-id-setup, and etc. With this change, the total size of the relevant executables and libshared slightly decreases. Before: ``` $ ll systemd-fstab-generator systemd-remount-fs systemd-machine-id-setup systemd-shutdown systemd-nspawn systemd src/shared/libsystemd-shared-247.so -rwxrwxr-x 1 watanabe watanabe 7577800 Jan 5 13:35 src/shared/libsystemd-shared-247.so -rwxrwxr-x 1 watanabe watanabe 4608360 Jan 5 13:35 systemd -rwxrwxr-x 1 watanabe watanabe 117240 Jan 5 13:35 systemd-fstab-generator -rwxrwxr-x 1 watanabe watanabe 61576 Jan 5 13:35 systemd-machine-id-setup -rwxrwxr-x 1 watanabe watanabe 853080 Jan 5 13:35 systemd-nspawn -rwxrwxr-x 1 watanabe watanabe 70600 Jan 5 13:35 systemd-remount-fs -rwxrwxr-x 1 watanabe watanabe 172624 Jan 5 13:35 systemd-shutdown ``` Total: 13461280 After: ``` $ ll systemd-fstab-generator systemd-remount-fs systemd-machine-id-setup systemd-shutdown systemd-nspawn systemd src/shared/libsystemd-shared-247.so -rwxrwxr-x 1 watanabe watanabe 7658336 Jan 5 13:32 src/shared/libsystemd-shared-247.so -rwxrwxr-x 1 watanabe watanabe 4523560 Jan 5 13:32 systemd -rwxrwxr-x 1 watanabe watanabe 78288 Jan 5 13:32 systemd-fstab-generator -rwxrwxr-x 1 watanabe watanabe 30984 Jan 5 13:32 systemd-machine-id-setup -rwxrwxr-x 1 watanabe watanabe 840384 Jan 5 13:32 systemd-nspawn -rwxrwxr-x 1 watanabe watanabe 39104 Jan 5 13:32 systemd-remount-fs -rwxrwxr-x 1 watanabe watanabe 117160 Jan 5 13:32 systemd-shutdown ``` Total: 13287816
Diffstat (limited to 'src/shared/mount-setup.h')
-rw-r--r--src/shared/mount-setup.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/shared/mount-setup.h b/src/shared/mount-setup.h
new file mode 100644
index 0000000000..29bd62f6bf
--- /dev/null
+++ b/src/shared/mount-setup.h
@@ -0,0 +1,12 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+#pragma once
+
+#include <stdbool.h>
+
+int mount_setup_early(void);
+int mount_setup(bool loaded_policy, bool leave_propagation);
+
+int mount_cgroup_controllers(void);
+
+bool mount_point_is_api(const char *path);
+bool mount_point_ignore(const char *path);