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