summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/basic/virt.c4
-rw-r--r--src/core/macros.systemd.in2
-rw-r--r--src/libsystemd/sd-event/test-event.c5
3 files changed, 7 insertions, 4 deletions
diff --git a/src/basic/virt.c b/src/basic/virt.c
index 1e5d6eea6e..a271c87333 100644
--- a/src/basic/virt.c
+++ b/src/basic/virt.c
@@ -269,13 +269,13 @@ int detect_vm(void) {
if (cached_found >= 0)
return cached_found;
- r = detect_vm_cpuid();
+ r = detect_vm_dmi();
if (r < 0)
return r;
if (r != VIRTUALIZATION_NONE)
goto finish;
- r = detect_vm_dmi();
+ r = detect_vm_cpuid();
if (r < 0)
return r;
if (r != VIRTUALIZATION_NONE)
diff --git a/src/core/macros.systemd.in b/src/core/macros.systemd.in
index 8a0e44b58c..2cace3d3ba 100644
--- a/src/core/macros.systemd.in
+++ b/src/core/macros.systemd.in
@@ -43,7 +43,7 @@ if [ $1 -eq 1 ] ; then \
fi \
%{nil}
-%systemd_user_post() %systemd_post --user --global %{?*}
+%systemd_user_post() %{expand:%systemd_post \\--user \\--global %%{?*}}
%systemd_preun() \
if [ $1 -eq 0 ] ; then \
diff --git a/src/libsystemd/sd-event/test-event.c b/src/libsystemd/sd-event/test-event.c
index 4a87159151..9417a8d1d1 100644
--- a/src/libsystemd/sd-event/test-event.c
+++ b/src/libsystemd/sd-event/test-event.c
@@ -173,6 +173,7 @@ static void test_basic(void) {
sd_event_source *w = NULL, *x = NULL, *y = NULL, *z = NULL, *q = NULL, *t = NULL;
static const char ch = 'x';
int a[2] = { -1, -1 }, b[2] = { -1, -1}, d[2] = { -1, -1}, k[2] = { -1, -1 };
+ uint64_t event_now;
assert_se(pipe(a) >= 0);
assert_se(pipe(b) >= 0);
@@ -180,6 +181,7 @@ static void test_basic(void) {
assert_se(pipe(k) >= 0);
assert_se(sd_event_default(&e) >= 0);
+ assert_se(sd_event_now(e, CLOCK_MONOTONIC, &event_now) > 0);
assert_se(sd_event_set_watchdog(e, true) >= 0);
@@ -241,7 +243,8 @@ static void test_basic(void) {
do_quit = true;
assert_se(sd_event_add_post(e, NULL, post_handler, NULL) >= 0);
- assert_se(sd_event_source_set_time(z, now(CLOCK_MONOTONIC) + 200 * USEC_PER_MSEC) >= 0);
+ assert_se(sd_event_now(e, CLOCK_MONOTONIC, &event_now) == 0);
+ assert_se(sd_event_source_set_time(z, event_now + 200 * USEC_PER_MSEC) >= 0);
assert_se(sd_event_source_set_enabled(z, SD_EVENT_ONESHOT) >= 0);
assert_se(sd_event_loop(e) >= 0);