(empty log message)
@@ -53,8 +53,8 @@ | ||
53 | 53 | * |
54 | 54 | * Returns return value from kernel_read(). |
55 | 55 | */ |
56 | -static int __init my_kernel_read(struct file *file, unsigned long offset, | |
57 | - char *addr, unsigned long count) | |
56 | +static inline int my_kernel_read(struct file *file, unsigned long offset, | |
57 | + char *addr, unsigned long count) | |
58 | 58 | { |
59 | 59 | #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 8) |
60 | 60 | /* |
@@ -90,6 +90,16 @@ | ||
90 | 90 | */ |
91 | 91 | static void *__init probe_find_symbol(const char *keyline) |
92 | 92 | { |
93 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 33) | |
94 | + char buf[128] = { }; | |
95 | + char *cp; | |
96 | + | |
97 | + strncpy(buf, keyline + 1, sizeof(buf) - 1); | |
98 | + cp = strchr(buf, '\n'); | |
99 | + if (cp) | |
100 | + *cp = '\0'; | |
101 | + return (void *) kallsyms_lookup_name(buf); | |
102 | +#else | |
93 | 103 | struct file *file = NULL; |
94 | 104 | char *buf; |
95 | 105 | unsigned long entry = 0; |
@@ -177,6 +187,7 @@ | ||
177 | 187 | filp_close(file, NULL); |
178 | 188 | out: |
179 | 189 | return (void *) entry; |
190 | +#endif | |
180 | 191 | } |
181 | 192 | |
182 | 193 | #endif |