summaryrefslogtreecommitdiff
path: root/src/shared/udev-util.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2019-04-03 16:12:41 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2019-04-04 02:15:14 +0900
commitfc40bfa7e271cf2191b605c321d16d09edfe235f (patch)
tree130d6836470edc7a43cf37fca81f25e70b222ea9 /src/shared/udev-util.c
parentb3e8032bb45b96957619e16b53b86f01d1a45458 (diff)
downloadsystemd-fc40bfa7e271cf2191b605c321d16d09edfe235f.tar.gz
udev-util: allocate an event loop of our own for waiting
We can't use the per-thread default one here, as it might already be running (for example, that's the case in portabled), and our event loops are not recursive, hence running them a second time is not OK.
Diffstat (limited to 'src/shared/udev-util.c')
-rw-r--r--src/shared/udev-util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/udev-util.c b/src/shared/udev-util.c
index 19d823c11d..4be9d7106c 100644
--- a/src/shared/udev-util.c
+++ b/src/shared/udev-util.c
@@ -133,7 +133,7 @@ int device_wait_for_initialization(sd_device *device, const char *subsystem, sd_
/* Wait until the device is initialized, so that we can get access to the ID_PATH property */
- r = sd_event_default(&event);
+ r = sd_event_new(&event);
if (r < 0)
return log_error_errno(r, "Failed to get default event: %m");