drbd_debugfs.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #include <linux/kernel.h>
  2. #include <linux/module.h>
  3. #include <linux/debugfs.h>
  4. #include "drbd_int.h"
  5. #ifdef CONFIG_DEBUG_FS
  6. int __init drbd_debugfs_init(void);
  7. void drbd_debugfs_cleanup(void);
  8. void drbd_debugfs_resource_add(struct drbd_resource *resource);
  9. void drbd_debugfs_resource_cleanup(struct drbd_resource *resource);
  10. void drbd_debugfs_connection_add(struct drbd_connection *connection);
  11. void drbd_debugfs_connection_cleanup(struct drbd_connection *connection);
  12. void drbd_debugfs_device_add(struct drbd_device *device);
  13. void drbd_debugfs_device_cleanup(struct drbd_device *device);
  14. void drbd_debugfs_peer_device_add(struct drbd_peer_device *peer_device);
  15. void drbd_debugfs_peer_device_cleanup(struct drbd_peer_device *peer_device);
  16. #else
  17. static inline int __init drbd_debugfs_init(void) { return -ENODEV; }
  18. static inline void drbd_debugfs_cleanup(void) { }
  19. static inline void drbd_debugfs_resource_add(struct drbd_resource *resource) { }
  20. static inline void drbd_debugfs_resource_cleanup(struct drbd_resource *resource) { }
  21. static inline void drbd_debugfs_connection_add(struct drbd_connection *connection) { }
  22. static inline void drbd_debugfs_connection_cleanup(struct drbd_connection *connection) { }
  23. static inline void drbd_debugfs_device_add(struct drbd_device *device) { }
  24. static inline void drbd_debugfs_device_cleanup(struct drbd_device *device) { }
  25. static inline void drbd_debugfs_peer_device_add(struct drbd_peer_device *peer_device) { }
  26. static inline void drbd_debugfs_peer_device_cleanup(struct drbd_peer_device *peer_device) { }
  27. #endif