910-kobject_uevent.patch 427 B

123456789101112131415161718192021
  1. --- a/lib/kobject_uevent.c
  2. +++ b/lib/kobject_uevent.c
  3. @@ -53,6 +53,18 @@ static const char *kobject_actions[] = {
  4. [KOBJ_OFFLINE] = "offline",
  5. };
  6. +u64 uevent_next_seqnum(void)
  7. +{
  8. + u64 seq;
  9. +
  10. + mutex_lock(&uevent_sock_mutex);
  11. + seq = ++uevent_seqnum;
  12. + mutex_unlock(&uevent_sock_mutex);
  13. +
  14. + return seq;
  15. +}
  16. +EXPORT_SYMBOL_GPL(uevent_next_seqnum);
  17. +
  18. /**
  19. * kobject_action_type - translate action string to numeric type
  20. *