git.annexia.org
/
libguestfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
docs: Clarify no additional error available from guestfs_create.
[libguestfs.git]
/
generator
/
generator_xdr.ml
diff --git
a/generator/generator_xdr.ml
b/generator/generator_xdr.ml
index
7f2e6eb
..
b44e2ef
100644
(file)
--- a/
generator/generator_xdr.ml
+++ b/
generator/generator_xdr.ml
@@
-64,10
+64,13
@@
let generate_xdr () =
) structs;
List.iter (
) 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
let name = "guestfs_" ^ shortname in
- (match
snd style
with
+ (match
args
with
| [] -> ()
| args ->
pr "struct %s_args {\n" name;
| [] -> ()
| args ->
pr "struct %s_args {\n" name;
@@
-86,7
+89,7
@@
let generate_xdr () =
) args;
pr "};\n\n"
);
) args;
pr "};\n\n"
);
- (match
fst style
with
+ (match
ret
with
| RErr -> ()
| RInt n ->
pr "struct %s_ret {\n" name;
| RErr -> ()
| RInt n ->
pr "struct %s_ret {\n" name;
@@
-154,7
+157,7
@@
let generate_xdr () =
*/
const GUESTFS_PROGRAM = 0x2000F5F5;
*/
const GUESTFS_PROGRAM = 0x2000F5F5;
-const GUESTFS_PROTOCOL_VERSION =
2
;
+const GUESTFS_PROTOCOL_VERSION =
3
;
/* These constants must be larger than any possible message length. */
const GUESTFS_LAUNCH_FLAG = 0xf5f55ff5;
/* These constants must be larger than any possible message length. */
const GUESTFS_LAUNCH_FLAG = 0xf5f55ff5;
@@
-178,7
+181,8
@@
enum guestfs_message_status {
pr "\
struct guestfs_message_error {
pr "\
struct guestfs_message_error {
- int linux_errno; /* Linux errno if available. */
+ string errno_string<32>; /* errno eg. \"EINVAL\", empty string
+ if errno not available */
string error_message<GUESTFS_ERROR_LEN>;
};
string error_message<GUESTFS_ERROR_LEN>;
};