summaryrefslogtreecommitdiffstats
path: root/generator/generator_xdr.ml
diff options
context:
space:
mode:
Diffstat (limited to 'generator/generator_xdr.ml')
-rw-r--r--generator/generator_xdr.ml9
1 files changed, 6 insertions, 3 deletions
diff --git a/generator/generator_xdr.ml b/generator/generator_xdr.ml
index 7f2e6eb9..49421499 100644
--- a/generator/generator_xdr.ml
+++ b/generator/generator_xdr.ml
@@ -64,10 +64,13 @@ let generate_xdr () =
) structs;
List.iter (
- fun (shortname, style, _, _, _, _, _) ->
+ fun (shortname, (ret, args, optargs), _, _, _, _, _) ->
+ if optargs <> [] then
+ failwithf "optional arguments not supported in XDR yet";
+
let name = "guestfs_" ^ shortname in
- (match snd style with
+ (match args with
| [] -> ()
| args ->
pr "struct %s_args {\n" name;
@@ -86,7 +89,7 @@ let generate_xdr () =
) args;
pr "};\n\n"
);
- (match fst style with
+ (match ret with
| RErr -> ()
| RInt n ->
pr "struct %s_ret {\n" name;