aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKristen Accardi <kristen.c.accardi@intel.com>2006-06-24 19:36:00 -0400
committerLen Brown <len.brown@intel.com>2006-06-27 01:24:15 -0400
commita6a888b3c20cf559c8a2e6e4d86c570dda2ef0f5 (patch)
treeeab2875166d1a7fd95a8bb2554f48963a38d06be
parent5e7d8818114f08ad9078d2c1a8a88d78d49de8dc (diff)
KEVENT: add new uevent for dock
so that userspace can be notified of dock and undock events. Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Len Brown <len.brown@intel.com>
-rw-r--r--include/linux/kobject.h2
-rw-r--r--lib/kobject_uevent.c4
2 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/kobject.h b/include/linux/kobject.h
index 2d229327959e..0503b2ed8bae 100644
--- a/include/linux/kobject.h
+++ b/include/linux/kobject.h
@@ -46,6 +46,8 @@ enum kobject_action {
46 KOBJ_UMOUNT = (__force kobject_action_t) 0x05, /* umount event for block devices (broken) */ 46 KOBJ_UMOUNT = (__force kobject_action_t) 0x05, /* umount event for block devices (broken) */
47 KOBJ_OFFLINE = (__force kobject_action_t) 0x06, /* device offline */ 47 KOBJ_OFFLINE = (__force kobject_action_t) 0x06, /* device offline */
48 KOBJ_ONLINE = (__force kobject_action_t) 0x07, /* device online */ 48 KOBJ_ONLINE = (__force kobject_action_t) 0x07, /* device online */
49 KOBJ_UNDOCK = (__force kobject_action_t) 0x08, /* undocking */
50 KOBJ_DOCK = (__force kobject_action_t) 0x09, /* dock */
49}; 51};
50 52
51struct kobject { 53struct kobject {
diff --git a/lib/kobject_uevent.c b/lib/kobject_uevent.c
index 7f20e7b857cb..2b1530fc573b 100644
--- a/lib/kobject_uevent.c
+++ b/lib/kobject_uevent.c
@@ -50,6 +50,10 @@ static char *action_to_string(enum kobject_action action)
50 return "offline"; 50 return "offline";
51 case KOBJ_ONLINE: 51 case KOBJ_ONLINE:
52 return "online"; 52 return "online";
53 case KOBJ_DOCK:
54 return "dock";
55 case KOBJ_UNDOCK:
56 return "undock";
53 default: 57 default:
54 return NULL; 58 return NULL;
55 } 59 }