X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=include%2Fwrapper%2Fgenhd.h;h=3c6dbcbe41a386e6c0bfa593c6c3bf479009f399;hb=a88ee460b93c67ca756bd91ee9a8660813f65bd8;hp=c28a52e343dfe730d1a98ecc2395080c04cb1910;hpb=7633c7736aefbf2ac3c308021d7aa2bb3229ae94;p=lttng-modules.git diff --git a/include/wrapper/genhd.h b/include/wrapper/genhd.h index c28a52e3..3c6dbcbe 100644 --- a/include/wrapper/genhd.h +++ b/include/wrapper/genhd.h @@ -13,12 +13,11 @@ #define _LTTNG_WRAPPER_GENHD_H #include -#include -#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0)) -#define LTTNG_DISK_PART_TYPE struct block_device +#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,17,0)) +#define LTTNG_GENHD_FL_HIDDEN GENHD_FL_HIDDEN #else -#define LTTNG_DISK_PART_TYPE struct hd_struct +#define LTTNG_GENHD_FL_HIDDEN GENHD_FL_SUPPRESS_PARTITION_INFO #endif #ifdef CONFIG_KALLSYMS_ALL @@ -101,59 +100,4 @@ struct device_type *wrapper_get_disk_type(void) #endif -/* - * This wrapper has an 'int' return type instead of the original 'void', to be - * able to report the symbol lookup failure to the caller. - * - * Return 0 on success, -1 on error. - */ -int wrapper_disk_part_iter_init(struct disk_part_iter *piter, struct gendisk *disk, - unsigned int flags); -LTTNG_DISK_PART_TYPE *wrapper_disk_part_iter_next(struct disk_part_iter *piter); -void wrapper_disk_part_iter_exit(struct disk_part_iter *piter); - -/* - * Canary function to check for 'disk_part_iter_init()' at compile time. - * - * From 'include/linux/genhd.h': - * - * extern void disk_part_iter_init(struct disk_part_iter *piter, - * struct gendisk *disk, unsigned int flags); - * - */ -static inline -void __canary__disk_part_iter_init(struct disk_part_iter *piter, struct gendisk *disk, - unsigned int flags) -{ - disk_part_iter_init(piter, disk, flags); -} - -/* - * Canary function to check for 'disk_part_iter_next()' at compile time. - * - * From 'include/linux/genhd.h': - * - * struct block_device *disk_part_iter_next(struct disk_part_iter *piter); - * - */ -static inline -LTTNG_DISK_PART_TYPE *__canary__disk_part_iter_next(struct disk_part_iter *piter) -{ - return disk_part_iter_next(piter); -} - -/* - * Canary function to check for 'disk_part_iter_exit()' at compile time. - * - * From 'include/linux/genhd.h': - * - * extern void disk_part_iter_exit(struct disk_part_iter *piter); - * - */ -static inline -void __canary__disk_part_iter_exit(struct disk_part_iter *piter) -{ - return disk_part_iter_exit(piter); -} - #endif /* _LTTNG_WRAPPER_GENHD_H */