On Friday, 21 April 2017 16:06:47 CEST Richard W.M. Jones wrote:
Previously we had lots of types like String, Device, StringList,
DeviceList, etc. where Device was just a String with magical
properties (but only inside the daemon), and DeviceList was just a
list of Device strings.
[...]
Sorry for the late reply.
It seems mostly good to me, I have just one note below:
diff --git a/generator/XDR.ml b/generator/XDR.ml
index 634a4f336..b0ca26558 100644
--- a/generator/XDR.ml
+++ b/generator/XDR.ml
pr "struct %s_args {\n" name;
List.iter (
function
- | Pathname n | Device n | Mountable n | Dev_or_Path n
- | Mountable_or_Path n | String n
- | Key n | GUID n ->
+ | String (_, n) ->
pr " string %s<>;\n" n
| OptString n -> pr " guestfs_str *%s;\n" n
- | StringList n | DeviceList n | FilenameList n ->
+ | StringList (_, n) ->
pr " guestfs_str %s<>;\n" n
| Bool n -> pr " bool %s;\n" n
| Int n -> pr " int %s;\n" n
| Int64 n -> pr " int64_t %s;\n" n
| BufferIn n ->
pr " opaque %s<>;\n" n
- | FileIn _ | FileOut _ | Pointer _ -> assert false
+ | Pointer _ -> assert false
There's a small behaviour change, as in String (FileIn|FileOut) will
not assert anymore here. It does not seem a bit issue, since because
of the assert such types did not reach this code.
Thanks,
--
Pino Toscano