]> err.no Git - systemd/commitdiff
test: add RUN+="socket: ..." to a test to run monitor code
authorKay Sievers <kay.sievers@vrfy.org>
Sun, 26 Oct 2008 03:35:32 +0000 (04:35 +0100)
committerKay Sievers <kay.sievers@vrfy.org>
Sun, 26 Oct 2008 03:35:32 +0000 (04:35 +0100)
test/udev-test.pl
udev/lib/libudev-device.c

index 767f6adeb4e10f6bac23e8ddd1eb2fe5077cca5e..096977a611044683ceeaad2ebe3200413b272b47 100755 (executable)
@@ -36,7 +36,7 @@ my @tests = (
                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
                exp_name        => "boot_disk" ,
                rules           => <<EOF
-SUBSYSTEMS=="scsi", ATTRS{vendor}=="ATA", NAME="boot_disk%n"
+SUBSYSTEMS=="scsi", ATTRS{vendor}=="ATA", NAME="boot_disk%n", RUN+="socket:@/org/kernel/udev/monitor"
 KERNEL=="ttyACM0", NAME="modem"
 EOF
        },
@@ -1663,7 +1663,7 @@ EOF
                exp_name        => "sda-8741C4G-end",
                exp_perms       => "0:0:0660",
                rules           => <<EOF
-KERNEL=="sda", NAME="%k-%s{[dmi/id]product_name}-end"
+KERNEL=="sda", NAME="%k-%s{[dmi/id]product_name}-end", RUN+="socket:@/org/kernel/udev/monitor"
 EOF
        },
 
index b8f4b8ba7127fc51868055fddba43bfb09f0ef8e..bad6e94de58f462a0e6fac888442f3e2b68eca69 100644 (file)
@@ -1079,7 +1079,7 @@ static int update_envp_monitor_buf(struct udev_device *udev_device)
 char **udev_device_get_properties_envp(struct udev_device *udev_device)
 {
        if (!udev_device->envp_uptodate)
-               if (update_envp_monitor_buf(udev_device) < 32)
+               if (update_envp_monitor_buf(udev_device) != 0)
                        return NULL;
        return udev_device->envp;
 }
@@ -1087,7 +1087,7 @@ char **udev_device_get_properties_envp(struct udev_device *udev_device)
 ssize_t udev_device_get_properties_monitor_buf(struct udev_device *udev_device, const char **buf)
 {
        if (!udev_device->envp_uptodate)
-               if (update_envp_monitor_buf(udev_device) < 32)
+               if (update_envp_monitor_buf(udev_device) != 0)
                        return -EINVAL;
        *buf = udev_device->monitor_buf;
        return udev_device->monitor_buf_len;