]> err.no Git - systemd/commitdiff
udevadm: trigger - fix broken socket option check
authorKay Sievers <kay.sievers@vrfy.org>
Sat, 29 Mar 2008 16:16:41 +0000 (17:16 +0100)
committerKay Sievers <kay.sievers@vrfy.org>
Sat, 29 Mar 2008 16:16:41 +0000 (17:16 +0100)
udevtrigger.c

index 7584e02a67dbeee9ce6e097b64f868a9afbf70b7..cebc518c432c73bb601f5a2a01fb6d2ebcf2108a 100644 (file)
@@ -235,7 +235,7 @@ static void exec_list(const char *action)
        list_for_each_entry_safe(loop_device, tmp_device, &device_list, node) {
                if (delay_device(loop_device->name))
                        continue;
-               if (sock)
+               if (sock >= 0)
                        pass_to_socket(loop_device->name, action);
                else
                        trigger_uevent(loop_device->name, action);
@@ -245,7 +245,7 @@ static void exec_list(const char *action)
 
        /* trigger remaining delayed devices */
        list_for_each_entry_safe(loop_device, tmp_device, &device_list, node) {
-               if (sock)
+               if (sock >= 0)
                        pass_to_socket(loop_device->name, action);
                else
                        trigger_uevent(loop_device->name, action);