git.annexia.org
/
libguestfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add prototype for timeval_diff.
[libguestfs.git]
/
generator
/
generator_xdr.ml
diff --git
a/generator/generator_xdr.ml
b/generator/generator_xdr.ml
index
ca114c5
..
5714c80
100644
(file)
--- a/
generator/generator_xdr.ml
+++ b/
generator/generator_xdr.ml
@@
-65,12
+65,14
@@
let generate_xdr () =
List.iter (
fun (shortname, (ret, args, optargs), _, _, _, _, _) ->
List.iter (
fun (shortname, (ret, args, optargs), _, _, _, _, _) ->
- if optargs <> [] then
- failwithf "optional arguments not supported in XDR yet";
-
let name = "guestfs_" ^ shortname in
let name = "guestfs_" ^ shortname in
- (match args with
+ (* Ordinary arguments and optional arguments are concatenated
+ * together in the XDR args struct. The optargs_bitmask field
+ * in the header controls which optional arguments are
+ * meaningful.
+ *)
+ (match args @ optargs with
| [] -> ()
| args ->
pr "struct %s_args {\n" name;
| [] -> ()
| args ->
pr "struct %s_args {\n" name;