projects
/
lttng-modules.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: move "user" attribute from field to type
[lttng-modules.git]
/
include
/
wrapper
/
genhd.h
diff --git
a/include/wrapper/genhd.h
b/include/wrapper/genhd.h
index 30fc5cea60ec75a8bb1b0cf38d7e0657d513e1fb..4a59b68e9c3b0f4785b9e7d7b00dbe0bc5d37d85 100644
(file)
--- a/
include/wrapper/genhd.h
+++ b/
include/wrapper/genhd.h
@@
-12,7
+12,17
@@
#ifndef _LTTNG_WRAPPER_GENHD_H
#define _LTTNG_WRAPPER_GENHD_H
#ifndef _LTTNG_WRAPPER_GENHD_H
#define _LTTNG_WRAPPER_GENHD_H
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,18,0))
+#include <linux/blkdev.h>
+#else
#include <linux/genhd.h>
#include <linux/genhd.h>
+#endif
+
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,17,0))
+#define LTTNG_GENHD_FL_HIDDEN GENHD_FL_HIDDEN
+#else
+#define LTTNG_GENHD_FL_HIDDEN GENHD_FL_SUPPRESS_PARTITION_INFO
+#endif
#ifdef CONFIG_KALLSYMS_ALL
#ifdef CONFIG_KALLSYMS_ALL
@@
-32,6
+42,19
@@
struct class *wrapper_get_block_class(void)
return ptr_block_class;
}
return ptr_block_class;
}
+/*
+ * Canary function to check for 'block_class' at compile time.
+ *
+ * From 'include/linux/genhd.h':
+ *
+ * extern struct class block_class;
+ */
+static inline
+struct class *__canary__get_block_class(void)
+{
+ return &block_class;
+}
+
static inline
struct device_type *wrapper_get_disk_type(void)
{
static inline
struct device_type *wrapper_get_disk_type(void)
{
@@
-45,6
+68,16
@@
struct device_type *wrapper_get_disk_type(void)
return ptr_disk_type;
}
return ptr_disk_type;
}
+/*
+ * No canary for 'disk_type', it's only defined in 'block/genhd.c'.
+ *
+ * static inline
+ * struct device_type *__canary__get_disk_type(void)
+ * {
+ * return &disk_type;
+ * }
+ */
+
#else
static inline
#else
static inline
This page took
0.030231 seconds
and
4
git commands to generate.