Blame SOURCES/0140-udev-Fix-ping-timeout-when-settle-timeout-is-0.patch
|
|
17b0f1 |
From e7cd53f60cc2cb5e98efa0e88cfd0e7dd8325085 Mon Sep 17 00:00:00 2001
|
|
|
17b0f1 |
From: Nir Soffer <nirsof@gmail.com>
|
|
|
17b0f1 |
Date: Sun, 19 Apr 2015 02:49:47 +0300
|
|
|
17b0f1 |
Subject: [PATCH] udev: Fix ping timeout when settle timeout is 0
|
|
|
17b0f1 |
|
|
|
17b0f1 |
When running udevadm settle --timeout=0, the ping always times out, and
|
|
|
17b0f1 |
udevadm will return 0 without checking the queue state.
|
|
|
17b0f1 |
|
|
|
17b0f1 |
(David: Use a reasonable timeout to still get the barrier provided by
|
|
|
17b0f1 |
ctrl-ping)
|
|
|
17b0f1 |
|
|
|
17b0f1 |
Cherry-picked from: 7375b3c4871861f100860ea4c2848e66b60e6ca4
|
|
|
17b0f1 |
Resolves: #1210981
|
|
|
17b0f1 |
---
|
|
|
17b0f1 |
src/udev/udevadm-settle.c | 2 +-
|
|
|
17b0f1 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
17b0f1 |
|
|
|
17b0f1 |
diff --git a/src/udev/udevadm-settle.c b/src/udev/udevadm-settle.c
|
|
|
17b0f1 |
index 40e3e28b1e..33597bc209 100644
|
|
|
17b0f1 |
--- a/src/udev/udevadm-settle.c
|
|
|
17b0f1 |
+++ b/src/udev/udevadm-settle.c
|
|
|
17b0f1 |
@@ -114,7 +114,7 @@ static int adm_settle(struct udev *udev, int argc, char *argv[]) {
|
|
|
17b0f1 |
|
|
|
17b0f1 |
uctrl = udev_ctrl_new(udev);
|
|
|
17b0f1 |
if (uctrl != NULL) {
|
|
|
17b0f1 |
- if (udev_ctrl_send_ping(uctrl, timeout) < 0) {
|
|
|
17b0f1 |
+ if (udev_ctrl_send_ping(uctrl, MAX(5U, timeout)) < 0) {
|
|
|
17b0f1 |
log_debug("no connection to daemon");
|
|
|
17b0f1 |
udev_ctrl_unref(uctrl);
|
|
|
17b0f1 |
return EXIT_SUCCESS;
|