From 9ab19695b5d74338352fbc8d85368172d0ba2296 Mon Sep 17 00:00:00 2001 From: Tom Cosgrove Date: Mon, 10 Jun 2024 14:24:28 +0100 Subject: [PATCH] Make psa_sim_generate.pl output the new type of server wrapper we want Signed-off-by: Tom Cosgrove --- .../psasim/src/psa_sim_generate.pl | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/tests/psa-client-server/psasim/src/psa_sim_generate.pl b/tests/psa-client-server/psasim/src/psa_sim_generate.pl index 19c6a0bf4a..efd50aa846 100755 --- a/tests/psa-client-server/psasim/src/psa_sim_generate.pl +++ b/tests/psa-client-server/psasim/src/psa_sim_generate.pl @@ -522,8 +522,9 @@ EOF push(@buffers, $n1); # Add to the list to be free()d at end } else { $argname =~ s/^\*//; # Remove any leading * + my $pointer = ($argtype =~ /^psa_\w+_operation_t/) ? "*" : ""; print $fh <{is_output}, @$args); @@ -616,9 +618,10 @@ EOF my $sep = ($i == $#outputs) ? ";" : " +"; $argtype =~ s/^const //; $argname =~ s/^\*//; # Remove any leading * + my $server_specific = ($argtype =~ /^psa_\w+_operation_t/) ? "server_" : ""; print $fh <{return}->{name}; my $args = $f->{args}; @@ -900,6 +905,9 @@ sub output_call print $fh " $n1, $n2"; } else { $argname =~ s/^\*/\&/; # Replace leading * with & + if ($is_server && $argtype =~ /^psa_\w+_operation_t/) { + $argname =~ s/^\&//; # Actually, for psa_XXX_operation_t, don't do this on the server side + } print $fh " $argname"; } my $sep = ($i == $#$args) ? "\n );" : ",";