# SPDX-License-Identifier: LGPL-2.1-or-later
-load_fragment_gperf_gperf = custom_target(
- input : 'load-fragment-gperf.gperf.in',
- output: 'load-fragment-gperf.gperf',
- command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'])
-
-libcore_build_dir = meson.current_build_dir()
-core_includes = [includes, include_directories('.')]
-
-systemd_pc = custom_target(
- input : 'systemd.pc.in',
- output : 'systemd.pc',
- command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
- install : pkgconfigdatadir != 'no',
- install_tag : 'devel',
- install_dir : pkgconfigdatadir)
-
-if conf.get('HAVE_LIBMOUNT') != 1
- libcore = disabler()
-
- core_test_template = test_template + {
- 'link_with' : [
- libcore,
- libshared,
- ],
- 'include_directories' : core_includes,
- 'suite' : 'core',
- }
-
- subdir_done()
-endif
-
libcore_sources = files(
'audit-fd.c',
'automount.c',
sources += libcore_sources
+load_fragment_gperf_gperf = custom_target(
+ input : 'load-fragment-gperf.gperf.in',
+ output: 'load-fragment-gperf.gperf',
+ command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'])
+
load_fragment_gperf_c = custom_target(
input : load_fragment_gperf_gperf,
output : 'load-fragment-gperf.c',
generated_sources += [load_fragment_gperf_c, load_fragment_gperf_nulstr_c, bpf_delegate_configs_inc]
libcore_sources += [load_fragment_gperf_c, load_fragment_gperf_nulstr_c, bpf_delegate_configs_inc]
+libcore_build_dir = meson.current_build_dir()
libcore_name = 'systemd-core-@0@'.format(shared_lib_tag)
libcore_static = static_library(
install : true,
install_dir : pkglibdir)
+core_includes = [includes, include_directories('.')]
+
systemd_sources = files(
'main.c',
'crash-handler.c',
install_dir : dir)
endforeach
+systemd_pc = custom_target(
+ input : 'systemd.pc.in',
+ output : 'systemd.pc',
+ command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
+ install : pkgconfigdatadir != 'no',
+ install_tag : 'devel',
+ install_dir : pkgconfigdatadir)
+
install_data('org.freedesktop.systemd1.conf',
install_dir : dbuspolicydir)
install_data('org.freedesktop.systemd1.service',
};
static int mount_dispatch_timer(sd_event_source *source, usec_t usec, void *userdata);
+#if HAVE_LIBMOUNT
static int mount_dispatch_io(sd_event_source *source, int fd, uint32_t revents, void *userdata);
+#endif
static void mount_enter_dead(Mount *m, MountResult f, bool flush_result);
static void mount_enter_mounted(Mount *m, MountResult f);
static void mount_cycle_clear(Mount *m);
return 0;
}
+#if HAVE_LIBMOUNT
static int mount_setup_new_unit(
Manager *m,
const char *name,
return 0;
}
+#endif
static int mount_load_proc_self_mountinfo(Manager *m, bool set_flags) {
+#if HAVE_LIBMOUNT
_cleanup_(mnt_free_tablep) struct libmnt_table *table = NULL;
_cleanup_(mnt_free_iterp) struct libmnt_iter *iter = NULL;
_cleanup_set_free_ Set *devices = NULL;
}
return 0;
+#else
+ return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP), "libmount support not compiled in");
+#endif
}
static void mount_shutdown(Manager *m) {
return UNIT(m)->perpetual || FLAGS_SET(m->proc_flags, MOUNT_PROC_IS_MOUNTED);
}
+#if HAVE_LIBMOUNT
static int mount_on_ratelimit_expire(sd_event_source *s, void *userdata) {
Manager *m = ASSERT_PTR(userdata);
Job *j;
return 0;
}
+#endif
static void mount_enumerate(Manager *m) {
+#if HAVE_LIBMOUNT
int r;
assert(m);
fail:
mount_shutdown(m);
+#else
+ log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP), "Cannot enumerate mounts, as libmount support is not compiled in");
+ mount_shutdown(m);
+#endif
}
static int drain_libmount(Manager *m) {
+#if HAVE_LIBMOUNT
bool rescan = false;
int r;
} while (r == 0);
return rescan;
+#else
+ return 0;
+#endif
}
static int mount_process_proc_self_mountinfo(Manager *m) {
return 0;
}
+#if HAVE_LIBMOUNT
static int mount_dispatch_io(sd_event_source *source, int fd, uint32_t revents, void *userdata) {
Manager *m = ASSERT_PTR(userdata);
return mount_process_proc_self_mountinfo(m);
}
+#endif
static void mount_reset_failed(Unit *u) {
Mount *m = MOUNT(u);