dm-uevent.h 1009 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. * Device Mapper Uevent Support
  4. *
  5. * Copyright IBM Corporation, 2007
  6. * Author: Mike Anderson <andmike@linux.vnet.ibm.com>
  7. */
  8. #ifndef DM_UEVENT_H
  9. #define DM_UEVENT_H
  10. enum dm_uevent_type {
  11. DM_UEVENT_PATH_FAILED,
  12. DM_UEVENT_PATH_REINSTATED,
  13. };
  14. #ifdef CONFIG_DM_UEVENT
  15. extern int dm_uevent_init(void);
  16. extern void dm_uevent_exit(void);
  17. extern void dm_send_uevents(struct list_head *events, struct kobject *kobj);
  18. extern void dm_path_uevent(enum dm_uevent_type event_type,
  19. struct dm_target *ti, const char *path,
  20. unsigned nr_valid_paths);
  21. #else
  22. static inline int dm_uevent_init(void)
  23. {
  24. return 0;
  25. }
  26. static inline void dm_uevent_exit(void)
  27. {
  28. }
  29. static inline void dm_send_uevents(struct list_head *events,
  30. struct kobject *kobj)
  31. {
  32. }
  33. static inline void dm_path_uevent(enum dm_uevent_type event_type,
  34. struct dm_target *ti, const char *path,
  35. unsigned nr_valid_paths)
  36. {
  37. }
  38. #endif /* CONFIG_DM_UEVENT */
  39. #endif /* DM_UEVENT_H */