linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* WAIT_FOR_SYSFS ignores further conditions
@ 2006-01-29 12:00 Andrey Borzenkov
  2006-01-30 16:37 ` Andrey Borzenkov
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Andrey Borzenkov @ 2006-01-29 12:00 UTC (permalink / raw)
  To: linux-hotplug


[-- Attachment #1.1: Type: text/plain, Size: 84 bytes --]

Is it intentional? It looks rather like copy'n'paste slip. Patch attached.

-andrey

[-- Attachment #1.2: wait_for_sysfs_ignores_other_conditions.diff --]
[-- Type: text/x-diff, Size: 1181 bytes --]

Subject: [PATCH] WAIT_FOR_SYSFS was ignoring other conditions, notably SYSFS

From: Andrey Borzenkov <arvidjaar@mail.ru>



Signed-off-by: Andrey Borzenkov <arvidjaar@mail.ru>
---

 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
--- a/udev_rules.c
+++ b/udev_rules.c
@@ -736,16 +736,14 @@ static int match_rule(struct udevice *ud
 		int match;
 
 		match = (wait_for_sysfs(udev, key_val(rule, &rule->wait_for_sysfs), 3) == 0);
-		if (match && (rule->wait_for_sysfs.operation != KEY_OP_NOMATCH)) {
+		if (match && (rule->wait_for_sysfs.operation == KEY_OP_MATCH))
 			dbg("WAIT_FOR_SYSFS is true (matching value)");
-			return 0;
-		}
-		if (!match && (rule->wait_for_sysfs.operation == KEY_OP_NOMATCH)) {
+		else if (!match && (rule->wait_for_sysfs.operation == KEY_OP_NOMATCH))
 			dbg("WAIT_FOR_SYSFS is true, (non matching value)");
-			return 0;
+		else {
+			dbg("WAIT_FOR_SYSFS is false");
+			goto nomatch;
 		}
-		dbg("WAIT_FOR_SYSFS is false");
-		return -1;
 	}
 
 	/* walk up the chain of parent devices and find a match */

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-02-03 13:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-29 12:00 WAIT_FOR_SYSFS ignores further conditions Andrey Borzenkov
2006-01-30 16:37 ` Andrey Borzenkov
2006-01-31 14:30 ` Kay Sievers
2006-02-03 13:05 ` Kay Sievers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).