diff options
-rw-r--r-- | man/sd_event_new.xml | 5 | ||||
-rw-r--r-- | src/basic/virt.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/man/sd_event_new.xml b/man/sd_event_new.xml index 2c23b00a8c..c0a5e98177 100644 --- a/man/sd_event_new.xml +++ b/man/sd_event_new.xml @@ -183,8 +183,9 @@ <refsect1> <title>Return Value</title> - <para>On success, <function>sd_event_new()</function> and - <function>sd_event_default()</function> return 0 or a positive + <para>On success, <function>sd_event_new()</function>, + <function>sd_event_default()</function> and + <function>sd_event_get_tid()</function> return 0 or a positive integer. On failure, they return a negative errno-style error code. <function>sd_event_ref()</function> always returns a pointer to the event loop object passed diff --git a/src/basic/virt.c b/src/basic/virt.c index 10a2043746..41012d52a0 100644 --- a/src/basic/virt.c +++ b/src/basic/virt.c @@ -33,6 +33,7 @@ #include "string-table.h" #include "string-util.h" #include "virt.h" +#include "env-util.h" static int detect_vm_cpuid(void) { @@ -487,6 +488,9 @@ int detect_virtualization(void) { int running_in_chroot(void) { int ret; + if (getenv_bool("SYSTEMD_IGNORE_CHROOT") > 0) + return 0; + ret = files_same("/proc/1/root", "/"); if (ret < 0) return ret; |