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