diff options
author | Kay Sievers <kay.sievers@suse.de> | 2005-07-16 07:46:31 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@suse.de> | 2005-07-16 07:46:31 +0200 |
commit | 594dd610252923591ed0f310695e82d3fb87e581 (patch) | |
tree | 7dc290f161526aca177dfac7934842e6a6d281c1 /udev_rules.c | |
parent | c609f627fae97bef5f163eb2eb993d3c8211f768 (diff) |
allow rules to have labels and skip to next label
This will allow us to have whole blocks of rules to skip
conditionally. The following section creates the node "yes":
GOTO="TEST"
NAME="no"
NAME="no2", LABEL="NO"
NAME="yes", LABEL="TEST"
NAME="no3"
Diffstat (limited to 'udev_rules.c')
-rw-r--r-- | udev_rules.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/udev_rules.c b/udev_rules.c index 4bf05cd437..939febe8f6 100644 --- a/udev_rules.c +++ b/udev_rules.c @@ -1069,6 +1069,11 @@ int udev_rules_get_name(struct udev_rules *rules, struct udevice *udev, struct s dbg("last rule to be applied"); break; } + + if (rule->goto_label.operation != KEY_OP_UNSET) { + dbg("moving forward to label '%s'", key_val(rule, &rule->goto_label)); + udev_rules_iter_label(rules, key_val(rule, &rule->goto_label)); + } } } |