2012-02-02 08:23:54 +00:00
|
|
|
--- a/lib/kobject_uevent.c
|
|
|
|
+++ b/lib/kobject_uevent.c
|
2012-04-09 14:48:56 +00:00
|
|
|
@@ -50,6 +50,18 @@ static const char *kobject_actions[] = {
|
2012-02-02 08:23:54 +00:00
|
|
|
[KOBJ_OFFLINE] = "offline",
|
|
|
|
};
|
|
|
|
|
|
|
|
+u64 uevent_next_seqnum(void)
|
|
|
|
+{
|
|
|
|
+ u64 seq;
|
|
|
|
+
|
2012-04-09 14:48:56 +00:00
|
|
|
+ mutex_lock(&uevent_sock_mutex);
|
2012-02-02 08:23:54 +00:00
|
|
|
+ seq = ++uevent_seqnum;
|
2012-04-09 14:48:56 +00:00
|
|
|
+ mutex_unlock(&uevent_sock_mutex);
|
2012-02-02 08:23:54 +00:00
|
|
|
+
|
|
|
|
+ return seq;
|
|
|
|
+}
|
|
|
|
+EXPORT_SYMBOL_GPL(uevent_next_seqnum);
|
|
|
|
+
|
|
|
|
/**
|
|
|
|
* kobject_action_type - translate action string to numeric type
|
|
|
|
*
|