diff options
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/Makefile.am | 1 | ||||
-rw-r--r-- | src/shared/virt.c | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/shared/Makefile.am b/src/shared/Makefile.am index dde3e27b56..6dfd91f4cf 100644 --- a/src/shared/Makefile.am +++ b/src/shared/Makefile.am @@ -1,6 +1,7 @@ ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} AM_CPPFLAGS = \ + -DUDEV_ROOT_RUN=\"$(rootrundir)\" \ -include $(top_builddir)/config.h libudev_shared_la_SOURCES=\ diff --git a/src/shared/virt.c b/src/shared/virt.c index 96b3f5671f..358b4403d2 100644 --- a/src/shared/virt.c +++ b/src/shared/virt.c @@ -63,11 +63,11 @@ int detect_container(const char **id) { } else { /* Otherwise, PID 1 dropped this information into a - * file in /run. This is better than accessing + * file in UDEV_ROOT_RUN. This is better than accessing * /proc/1/environ, since we don't need CAP_SYS_PTRACE * for that. */ - r = read_one_line_file("/run/systemd/container", &m); + r = read_one_line_file(UDEV_ROOT_RUN "/systemd/container", &m); if (r == -ENOENT) { r = 0; goto finish; |