xfail "$test - addr (kernel support, but no hardware support)"
} elseif { $rc == 0 && $found == 1 } {
pass "$test - addr (hw breakpoint support)"
+} elseif { $res == 0 } {
+ xfail "$test - addr {no module data address}"
} else {
fail "$test - addr ($rc, $found)"
}
*/
#include <linux/kernel.h>
+#include <linux/version.h>
#include <linux/module.h>
#include <linux/proc_fs.h>
#include <linux/compiler.h>
return bytes;
}
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(5,6,0)
static struct file_operations stm_fops_cmd = {
- .owner = THIS_MODULE,
- .write = stm_write_cmd,
+ .owner = THIS_MODULE,
+ .write = stm_write_cmd,
.read = stm_read_cmd,
};
+#else
+static struct proc_ops stm_fops_cmd = {
+ .proc_write = stm_write_cmd,
+ .proc_read = stm_read_cmd,
+};
+#endif
#define CMD_FILE "stap_hwbkpt_cmd"