diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2007-04-05 19:40:38 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-04-27 13:57:31 -0400 |
commit | 22af74f3b221f1436a37554501431e51c06ee77e (patch) | |
tree | 11b0a9e75f2e7f80cf4a2617d74a0d6caaa023d5 | |
parent | 16574dccd8f62dc1b585325f8a6a0aab10047ed8 (diff) |
Driver core: warn when userspace writes to the uevent file in a non-supported way
In the future we will allow the uevent type to be written to the uevent
file to trigger the different types of uevents. But for now, as we only
support the ADD event, warn if userspace tries to write anything else to
this 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 | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c index 72c6ee57471b..f69305c7269d 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c | |||
@@ -296,6 +296,9 @@ out: | |||
296 | static ssize_t store_uevent(struct device *dev, struct device_attribute *attr, | 296 | static ssize_t store_uevent(struct device *dev, struct device_attribute *attr, |
297 | const char *buf, size_t count) | 297 | const char *buf, size_t count) |
298 | { | 298 | { |
299 | if (memcmp(buf, "add", 3) != 0) | ||
300 | dev_err(dev, "uevent: unsupported action-string; this will " | ||
301 | "be ignored in a future kernel version"); | ||
299 | kobject_uevent(&dev->kobj, KOBJ_ADD); | 302 | kobject_uevent(&dev->kobj, KOBJ_ADD); |
300 | return count; | 303 | return count; |
301 | } | 304 | } |