From 8fb06eecff9ac0887147380514a4d5babf372fc1 Mon Sep 17 00:00:00 2001 From: Anna Lyons Date: Mon, 21 Aug 2017 17:43:47 +1000 Subject: [PATCH] libsel4: Return seL4_Error in invocation stubs Some stubs return structs, which will not change, however instead of long for those that don't return structs they now return a seL4_Error. --- libsel4/tools/syscall_stub_gen.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libsel4/tools/syscall_stub_gen.py b/libsel4/tools/syscall_stub_gen.py index 871fb8cb2..ba9b6ecc4 100644 --- a/libsel4/tools/syscall_stub_gen.py +++ b/libsel4/tools/syscall_stub_gen.py @@ -566,7 +566,7 @@ def generate_stub(arch, wordsize, interface_name, method_name, method_id, input_ return_type = "%s_%s_t" % (interface_name, method_name) returning_struct = True else: - return_type = "long" + return_type = "seL4_Error" # # Print doxygen comment. @@ -658,7 +658,8 @@ def generate_stub(arch, wordsize, interface_name, method_name, method_id, input_ # Prepare the result. # label = "result.error" if returning_struct else "result" - result.append("\t%s = seL4_MessageInfo_get_label(output_tag);" % label) + cast = " (%s)" % return_type if not returning_struct else "" + result.append("\t%s =%s seL4_MessageInfo_get_label(output_tag);" % (label, cast)) result.append("") if not use_only_ipc_buffer: