From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrey Borzenkov Date: Sun, 29 Jan 2006 12:00:12 +0000 Subject: WAIT_FOR_SYSFS ignores further conditions Message-Id: <200601291500.15527.arvidjaar@mail.ru> MIME-Version: 1 Content-Type: multipart/mixed; boundary="nextPart1888162.pcsJ6TLKeH" List-Id: To: linux-hotplug@vger.kernel.org --nextPart1888162.pcsJ6TLKeH Content-Type: multipart/mixed; boundary="Boundary-01=_P5K3DVcRB7dchR3" Content-Transfer-Encoding: 7bit Content-Disposition: inline --Boundary-01=_P5K3DVcRB7dchR3 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Is it intentional? It looks rather like copy'n'paste slip. Patch attached. -andrey --Boundary-01=_P5K3DVcRB7dchR3 Content-Type: text/x-diff; charset="us-ascii"; name="wait_for_sysfs_ignores_other_conditions.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="wait_for_sysfs_ignores_other_conditions.diff" Subject: [PATCH] WAIT_FOR_SYSFS was ignoring other conditions, notably SYSFS =46rom: Andrey Borzenkov Signed-off-by: Andrey Borzenkov =2D-- udev_rules.c | 12 +++++------- 1 files changed, 5 insertions(+), 7 deletions(-) diff --git a/udev_rules.c b/udev_rules.c index f1bbfd8..dac6b43 100644 =2D-- a/udev_rules.c +++ b/udev_rules.c @@ -736,16 +736,14 @@ static int match_rule(struct udevice *ud int match; =20 match =3D (wait_for_sysfs(udev, key_val(rule, &rule->wait_for_sysfs), 3)= =3D=3D 0); =2D if (match && (rule->wait_for_sysfs.operation !=3D KEY_OP_NOMATCH)) { + if (match && (rule->wait_for_sysfs.operation =3D=3D KEY_OP_MATCH)) dbg("WAIT_FOR_SYSFS is true (matching value)"); =2D return 0; =2D } =2D if (!match && (rule->wait_for_sysfs.operation =3D=3D KEY_OP_NOMATCH)) { + else if (!match && (rule->wait_for_sysfs.operation =3D=3D KEY_OP_NOMATCH= )) dbg("WAIT_FOR_SYSFS is true, (non matching value)"); =2D return 0; + else { + dbg("WAIT_FOR_SYSFS is false"); + goto nomatch; } =2D dbg("WAIT_FOR_SYSFS is false"); =2D return -1; } =20 /* walk up the chain of parent devices and find a match */ --Boundary-01=_P5K3DVcRB7dchR3-- --nextPart1888162.pcsJ6TLKeH Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) iD8DBQBD3K5PR6LMutpd94wRAk4xAJ4gCsQo5VvUN5B2yJEYi/B5ggJ05gCg0vRR Dxef/24zkGeKecMsLgMbqP0= =rBeF -----END PGP SIGNATURE----- --nextPart1888162.pcsJ6TLKeH-- ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel