]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-device: ignore bind/unbind events for now
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Sun, 9 Dec 2018 19:59:34 +0000 (11:59 -0800)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 21 Dec 2018 18:48:13 +0000 (19:48 +0100)
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.

src/libsystemd/sd-device/device-private.c

index 36beb3e7dfa0a2fe07e8ef95697e9b9b06dbb952..01a5aa3d3f6dd1f9afbc0e0b3c780dbd68560878 100644 (file)
@@ -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)