Skip to content

Commit

Permalink
Driver-Core: require valid action string in uevent trigger
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kay Sievers authored and Greg Kroah-Hartman committed Mar 8, 2010
1 parent 7934779 commit 3f5468c
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions drivers/base/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 3f5468c

Please sign in to comment.