summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-device/device-private.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2018-12-09 11:59:34 -0800
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-12-21 19:48:13 +0100
commit56c886dc7ed5b2bb0882ba85136f4070545bfc1b (patch)
treebf5337d5d2c0bb2cdbf2c3b5401d3f22f041f8a3 /src/libsystemd/sd-device/device-private.c
parent8340b762e4f597e98a72de1385e74b9be04e521d (diff)
downloadsystemd-56c886dc7ed5b2bb0882ba85136f4070545bfc1b.tar.gz
sd-device: ignore bind/unbind events for now
Until systemd/udev are ready for the new events and do not flush entire device state on each new event received, we should ignore them.
Diffstat (limited to 'src/libsystemd/sd-device/device-private.c')
-rw-r--r--src/libsystemd/sd-device/device-private.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libsystemd/sd-device/device-private.c b/src/libsystemd/sd-device/device-private.c
index 36beb3e7df..01a5aa3d3f 100644
--- a/src/libsystemd/sd-device/device-private.c
+++ b/src/libsystemd/sd-device/device-private.c
@@ -326,6 +326,15 @@ static int device_append(sd_device *device, char *key, const char **_major, cons
action = device_action_from_string(value);
if (action == _DEVICE_ACTION_INVALID)
return -EINVAL;
+ /* FIXME: remove once we no longer flush previuos state for each action */
+ if (action == DEVICE_ACTION_BIND || action == DEVICE_ACTION_UNBIND) {
+ static bool warned;
+ if (!warned) {
+ log_device_debug(device, "sd-device: ignoring actions 'bind' and 'unbind'");
+ warned = true;
+ }
+ return -EINVAL;
+ }
} else if (streq(key, "SEQNUM")) {
r = safe_atou64(value, &seqnum);
if (r < 0)