File udev_rules-disk-devs-only.patch of Package open-vm-tools.7780

Only adjust timeout on disk devices.

The rule to set the timeout value for SCSI devices was too generic,
and caused error messages, when the timeout field was set
when it didn't exist. This is not harmful, but generates unnecessary
noise. This change adds a check to ensure the rules only apply to
disk devices.

Index: open-vm-tools-10.2.0-7253323/udev/99-vmware-scsi-udev.rules
===================================================================
--- open-vm-tools-10.2.0-7253323.orig/udev/99-vmware-scsi-udev.rules
+++ open-vm-tools-10.2.0-7253323/udev/99-vmware-scsi-udev.rules
@@ -1,3 +1,3 @@
-ACTION=="add", SUBSYSTEMS=="scsi", ATTRS{vendor}=="VMware*", ATTRS{timeout}=="?*", ATTRS{model}=="Virtual disk*", RUN+="/bin/sh -c 'echo 180 >/sys$DEVPATH/timeout'"
-ACTION=="add", SUBSYSTEMS=="scsi", ATTRS{vendor}=="VMware*", ATTRS{timeout}=="?*", ATTRS{model}=="VMware Virtual S", RUN+="/bin/sh -c 'echo 180 >/sys$DEVPATH/timeout'"
+ACTION=="add", SUBSYSTEMS=="scsi", ATTRS{vendor}=="VMware*" , ATTRS{model}=="Virtual disk*", ENV{DEVTYPE}=="disk", RUN+="/bin/sh -c 'echo 180 >/sys$DEVPATH/device/timeout'"
+ACTION=="add", SUBSYSTEMS=="scsi", ATTRS{vendor}=="VMware*" , ATTRS{model}=="VMware Virtual S", ENV{DEVTYPE}=="disk", RUN+="/bin/sh -c 'echo 180 >/sys$DEVPATH/device/timeout'"
openSUSE Build Service is sponsored by