linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrey Borzenkov <arvidjaar@mail.ru>
To: linux-hotplug@vger.kernel.org
Subject: WAIT_FOR_SYSFS ignores further conditions
Date: Sun, 29 Jan 2006 12:00:12 +0000	[thread overview]
Message-ID: <200601291500.15527.arvidjaar@mail.ru> (raw)


[-- 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 --]

             reply	other threads:[~2006-01-29 12:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-29 12:00 Andrey Borzenkov [this message]
2006-01-30 16:37 ` WAIT_FOR_SYSFS ignores further conditions Andrey Borzenkov
2006-01-31 14:30 ` Kay Sievers
2006-02-03 13:05 ` Kay Sievers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200601291500.15527.arvidjaar@mail.ru \
    --to=arvidjaar@mail.ru \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).