[Xen-devel] [PATCH RFC 2/9] libxl idl: allow implicit enum values

2015-06-24 Thread Rob Hoes
Introducing two special enum values: * ENUM_NEXT: equal to the previous value in the enum plus 1 * ENUM_PREV: equal to the previous value in the enum minus 1 This makes it a little easier to maintain enums for which we do not care too much about the exact enum values. Signed-off-by: Rob Hoes

[Xen-devel] [PATCH RFC 9/9] libxl: introduce specific error codes in libxl_device_nic_add

2015-06-24 Thread Rob Hoes
Signed-off-by: Rob Hoes --- tools/libxl/libxl.c | 8 tools/libxl/libxl_internal.c | 2 +- tools/libxl/libxl_types.idl | 4 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index f41f291..c0c0f12 100644 --- a/tools

[Xen-devel] [PATCH RFC 7/9] libxl: introduce specific error codes in libxl_device_disk_add

2015-06-24 Thread Rob Hoes
Signed-off-by: Rob Hoes --- tools/libxl/libxl.c | 21 ++--- tools/libxl/libxl_types.idl | 13 + 2 files changed, 27 insertions(+), 7 deletions(-) diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index f622981..2f56c6e 100644 --- a/tools/libxl/libxl.c

[Xen-devel] [PATCH RFC 4/9] libxl: use explicit error codes in libxl_ctx_alloc

2015-06-24 Thread Rob Hoes
Signed-off-by: Rob Hoes --- tools/libxl/libxl.c | 6 +++--- tools/libxl/libxl_event.c | 2 +- tools/libxl/libxl_types.idl | 3 +++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index a6eb2df..f622981 100644 --- a/tools/libxl

[Xen-devel] [PATCH RFC 5/9] libxl: introduce specific JSON error codes

2015-06-24 Thread Rob Hoes
Signed-off-by: Rob Hoes --- tools/libxl/libxl_dom.c | 6 +++--- tools/libxl/libxl_internal.c | 4 +--- tools/libxl/libxl_json.c | 4 ++-- tools/libxl/libxl_types.idl | 5 + 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/tools/libxl/libxl_dom.c b/tools/libxl

[Xen-devel] [PATCH RFC 0/9] libxl error reporting

2015-06-24 Thread Rob Hoes
Following the proposal from Euan Harris to improve libxl's error reporting [1], I have written a first couple of patches that I would like some feedback on. The focus of these patches is on improving the errors that can be raised by the device_add functions and some related ones. Does the approac

[Xen-devel] [PATCH RFC 8/9] libxl: introduce specific error codes in libxl_device_cdrom_insert

2015-06-24 Thread Rob Hoes
Signed-off-by: Rob Hoes --- tools/libxl/libxl.c | 12 ++-- tools/libxl/libxl_device.c | 6 +++--- tools/libxl/libxl_qmp.c | 4 +++- tools/libxl/libxl_types.idl | 22 +- 4 files changed, 33 insertions(+), 11 deletions(-) diff --git a/tools/libxl/libxl.c

[Xen-devel] [PATCH RFC 6/9] libxl: introduce specific error code for libxl__wait_device_connection

2015-06-24 Thread Rob Hoes
Signed-off-by: Rob Hoes --- tools/libxl/libxl_device.c | 1 + tools/libxl/libxl_types.idl | 3 +++ 2 files changed, 4 insertions(+) diff --git a/tools/libxl/libxl_device.c b/tools/libxl/libxl_device.c index 93bb41e..56c6e2e 100644 --- a/tools/libxl/libxl_device.c +++ b/tools/libxl

[Xen-devel] [PATCH RFC 1/9] libxl idl: add comments to error enum

2015-06-24 Thread Rob Hoes
Signed-off-by: Rob Hoes --- tools/libxl/libxl_types.idl | 41 + 1 file changed, 41 insertions(+) diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl index 65d479f..6dc18fa 100644 --- a/tools/libxl/libxl_types.idl +++ b/tools/libxl

[Xen-devel] [PATCH RFC 3/9] libxl: introduce specific xenstore error codes

2015-06-24 Thread Rob Hoes
Signed-off-by: Rob Hoes --- tools/libxl/libxl_types.idl | 8 tools/libxl/libxl_xshelp.c | 14 +++--- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl index 6dc18fa..e9b3477 100644 --- a/tools/libxl

Re: [Xen-devel] [PATCH RFC 1/9] libxl idl: add comments to error enum

2015-06-26 Thread Rob Hoes
> On 24 Jun 2015, at 16:06, Ian Jackson wrote: ... >> +# Out of memory (malloc or similar failed) >> (-5, "NOMEM"), > > Should say whether this includes "host does not have enough memory to > create the specified domain" as well as "malloc failed in toolstack". > > NB that we are trying

Re: [Xen-devel] [PATCH RFC 2/9] libxl idl: allow implicit enum values

2015-06-26 Thread Rob Hoes
On 25 Jun 2015, at 16:59, Ian Campbell wrote: > > On Wed, 2015-06-24 at 16:08 +0100, Ian Jackson wrote: >> Rob Hoes writes ("[PATCH RFC 2/9] libxl idl: allow implicit enum values"): >>> Introducing two special enum values: >>> * ENUM_NEXT: equal

Re: [Xen-devel] [PATCH RFC 3/9] libxl: introduce specific xenstore error codes

2015-06-26 Thread Rob Hoes
> On 24 Jun 2015, at 16:10, Ian Jackson wrote: > > Rob Hoes writes ("[PATCH RFC 3/9] libxl: introduce specific xenstore error > codes"): >> Signed-off-by: Rob Hoes > > I don't understand the distinctions you are trying to make here. Is > it really

Re: [Xen-devel] [PATCH RFC 3/9] libxl: introduce specific xenstore error codes

2015-06-26 Thread Rob Hoes
> On 26 Jun 2015, at 15:36, Rob Hoes wrote: > >> On 24 Jun 2015, at 16:10, Ian Jackson wrote: >> >> Rob Hoes writes ("[PATCH RFC 3/9] libxl: introduce specific xenstore error >> codes"): >>> Signed-off-by: Rob Hoes >> >> I don&#

Re: [Xen-devel] [PATCH RFC 8/9] libxl: introduce specific error codes in libxl_device_cdrom_insert

2015-06-26 Thread Rob Hoes
> On 24 Jun 2015, at 16:26, Ian Jackson wrote: > > Rob Hoes writes ("[PATCH RFC 8/9] libxl: introduce specific error codes in > libxl_device_cdrom_insert"): >> Signed-off-by: Rob Hoes > >> if (libxl_get_stubdom_id(ctx, domid) != 0) { >>

Re: [Xen-devel] [PATCH RFC 9/9] libxl: introduce specific error codes in libxl_device_nic_add

2015-06-26 Thread Rob Hoes
> On 24 Jun 2015, at 16:11, Ian Jackson wrote: > > Rob Hoes writes ("[PATCH RFC 9/9] libxl: introduce specific error codes in > libxl_device_nic_add"): >> Signed-off-by: Rob Hoes > ... >> +# NIC parameters could not be determined >>

Re: [Xen-devel] [PATCH RFC 7/9] libxl: introduce specific error codes in libxl_device_disk_add

2015-06-26 Thread Rob Hoes
On 24 Jun 2015, at 16:28, Ian Jackson wrote: > > Rob Hoes writes ("[PATCH RFC 7/9] libxl: introduce specific error codes in > libxl_device_disk_add"): >> Signed-off-by: Rob Hoes > ... >> diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c >> inde

Re: [Xen-devel] [PATCH v5 2/3] arm: Allow the user to specify the GIC version

2015-07-08 Thread Rob Hoes
> On 8 Jul 2015, at 12:37, Ian Campbell wrote: > ... > > I have a patch to genwrap.py which results in the following diff to the > generate ml files for the anonymous sub-struct added by the IDL change > above. > > Dave/Euan/Rob, is that idiomatic ocaml or is it possible to have > anonymous str

Re: [Xen-devel] [PATCH v5 2/3] arm: Allow the user to specify the GIC version

2015-07-08 Thread Rob Hoes
> On 8 Jul 2015, at 15:19, Ian Campbell wrote: > > On Wed, 2015-07-08 at 15:08 +0100, Rob Hoes wrote: >> >>> On 8 Jul 2015, at 12:37, Ian Campbell wrote: >>> ... >>> >>> I have a patch to genwrap.py which results in the following diff to the

Re: [Xen-devel] [PATCH] tools: ocaml: Handle anonymous struct members of structs in libxl IDL

2015-07-09 Thread Rob Hoes
xl_type : type__union; > + arch_arm : arch_arm__anon; As said on another thread, I’m not a fan of the __anon suffix. But I won’t object either, because in practice it doesn’t really matter. So: Acked-by: Rob Hoes > } > val default : ctx -> ?xl_t