From aea07c5b118ddea5693e00fa5b4d1cd8f2ec1c4d Mon Sep 17 00:00:00 2001 From: Dmitry Kovalenko Date: Fri, 3 Jul 2015 13:28:49 +0300 Subject: [PATCH] [FIX] build with old toolchain Change-Id: I6f4ec362441992aa573867531b6e73171a388e8b Signed-off-by: Dmitry Kovalenko --- us_manager/probes/probe_info_new.c | 12 ++++++------ us_manager/probes/probe_info_new.h | 14 +++++++------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/us_manager/probes/probe_info_new.c b/us_manager/probes/probe_info_new.c index 08b9bdf..5c764e8 100644 --- a/us_manager/probes/probe_info_new.c +++ b/us_manager/probes/probe_info_new.c @@ -41,8 +41,8 @@ static int urp_entry_handler(struct uretprobe_instance *ri, struct pt_regs *regs struct probe_info_new *info_new; info_new = probe_info_get_val(ip->info, struct probe_info_new *); - if (info_new->entry_handler) - return info_new->entry_handler(ri, regs); + if (info_new->u.rp.entry_handler) + return info_new->u.rp.entry_handler(ri, regs); } @@ -58,8 +58,8 @@ static int urp_ret_handler(struct uretprobe_instance *ri, struct pt_regs *regs) struct probe_info_new *info_new; info_new = probe_info_get_val(ip->info, struct probe_info_new *); - if (info_new->ret_handler) - return info_new->ret_handler(ri, regs); + if (info_new->u.rp.ret_handler) + return info_new->u.rp.ret_handler(ri, regs); } return 0; @@ -72,8 +72,8 @@ static int uprobe_handler(struct kprobe *p, struct pt_regs *regs) struct probe_info_new *info_new; info_new = probe_info_get_val(ip->info, struct probe_info_new *); - if (info_new->handler) - return info_new->handler(p, regs); + if (info_new->u.p.handler) + return info_new->u.p.handler(p, regs); return 0; } diff --git a/us_manager/probes/probe_info_new.h b/us_manager/probes/probe_info_new.h index bfc1fec..62ddaec 100644 --- a/us_manager/probes/probe_info_new.h +++ b/us_manager/probes/probe_info_new.h @@ -37,7 +37,7 @@ struct probe_info_new { union { struct { kprobe_pre_handler_t handler; - }; + } p; struct { uretprobe_handler_t entry_handler; @@ -47,8 +47,8 @@ struct probe_info_new { * currently data_size = sizeof(void *) */ size_t data_size; - }; - }; + } rp; + } u; /* private */ struct probe_info *info; @@ -64,15 +64,15 @@ struct probe_new { #define MAKE_UPROBE(_handler) \ { \ .type = SWAP_NEW_UP, \ - .handler = _handler \ + .u.p.handler = _handler \ } #define MAKE_URPROBE(_entry, _ret, _size) \ { \ .type = SWAP_NEW_URP, \ - .entry_handler = _entry, \ - .ret_handler = _ret, \ - .data_size = _size \ + .u.rp.entry_handler = _entry, \ + .u.rp.ret_handler = _ret, \ + .u.rp.data_size = _size \ } struct probe_info_otg { -- 2.7.4