diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2010-01-14 21:54:37 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-03-08 01:04:48 (GMT) |
commit | 3f5468c9ae293cbca43e4ffe6ca3b3235189042a (patch) | |
tree | 8aa6cfd42558301b02bf651d58f9f69519ce6231 | |
parent | 7934779a69f1184f29d786b89e77dd14519bd226 (diff) | |
download | linux-3f5468c9ae293cbca43e4ffe6ca3b3235189042a.tar.xz |
Driver-Core: require valid action string in uevent trigger
No longer fall back to "add" and warn, but always require a valid
action-string written to the "uevent" file.
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/base/core.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c index fb4bc4f..f6c73a9 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -306,15 +306,10 @@ static ssize_t store_uevent(struct device *dev, struct device_attribute *attr, { enum kobject_action action; - if (kobject_action_type(buf, count, &action) == 0) { + if (kobject_action_type(buf, count, &action) == 0) kobject_uevent(&dev->kobj, action); - goto out; - } - - dev_err(dev, "uevent: unsupported action-string; this will " - "be ignored in a future kernel version\n"); - kobject_uevent(&dev->kobj, KOBJ_ADD); -out: + else + dev_err(dev, "uevent: unknown action-string\n"); return count; } |