From fb262785af40bfb07918d1ef61641ec88175d559 Mon Sep 17 00:00:00 2001 From: Haru Date: Fri, 15 Apr 2016 20:14:43 +0200 Subject: Added lclif packet handlers to the lclif interface Signed-off-by: Haru --- tools/HPMHookGen/HPMHookGen.pl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/HPMHookGen/HPMHookGen.pl b/tools/HPMHookGen/HPMHookGen.pl index 74cc0f863..0e33fd002 100755 --- a/tools/HPMHookGen/HPMHookGen.pl +++ b/tools/HPMHookGen/HPMHookGen.pl @@ -361,9 +361,14 @@ foreach my $file (@files) { # Loop through the xml files $astart <=> $bstart } @$memberdef) { # Loop through the members my $t = $f->{argsstring}->[0]; + my $def = $f->{definition}->[0]; + if ($f->{type}->[0] =~ /^\s*LoginParseFunc\s*\*\s*$/) { + $t = ')(int fd, struct login_session_data *sd)'; # typedef LoginParseFunc + $def =~ s/^LoginParseFunc\s*\*\s*(.*)$/enum parsefunc_rcode(* $1) (int fd, struct login_session_data *sd)/; + } next unless ref $t ne 'HASH' and $t =~ /^[^\[]/; # If it's not a string, or if it starts with an array subscript, we can skip it - my $if = parse($t, $f->{definition}->[0]); + my $if = parse($t, $def); next unless scalar keys %$if; # If it returns an empty hash reference, an error must've occurred # Skip variadic functions, we only allow hooks on their arglist equivalents. -- cgit v1.2.3-60-g2f50