Re: [libvirt] [PATCHv2 04/27] libvirt-qemu: use unsigned flags

2011-07-13 Thread Matthias Bolte
2011/7/8 Eric Blake ebl...@redhat.com:
 Like commit 1740c381, but for libvirt-qemu.

 * src/remote/qemu_protocol.x (qemu_monitor_command_args): Adjust
 type to match API.
 * src/qemu_protocol-structs: Update accordingly.
 ---

 v2: new patch

  src/qemu_protocol-structs  |    2 +-
  src/remote/qemu_protocol.x |    4 ++--
  2 files changed, 3 insertions(+), 3 deletions(-)

Should we have a syntax-check rule to enforce unsigned int flags in
the RPC protocol like you added a rule to do this in the public API.

ACK.

-- 
Matthias Bolte
http://photron.blogspot.com

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCHv2 04/27] libvirt-qemu: use unsigned flags

2011-07-13 Thread Eric Blake
On 07/13/2011 03:54 AM, Matthias Bolte wrote:
 2011/7/8 Eric Blake ebl...@redhat.com:
 Like commit 1740c381, but for libvirt-qemu.

 * src/remote/qemu_protocol.x (qemu_monitor_command_args): Adjust
 type to match API.
 * src/qemu_protocol-structs: Update accordingly.
 ---

 v2: new patch

  src/qemu_protocol-structs  |2 +-
  src/remote/qemu_protocol.x |4 ++--
  2 files changed, 3 insertions(+), 3 deletions(-)
 
 Should we have a syntax-check rule to enforce unsigned int flags in
 the RPC protocol like you added a rule to do this in the public API.

The syntax-check rule in 27/27 should cover this - it will complain if
we introduce a 'int flags;' in any of the *protocol.x files, which
should prod us to use 'unsigned int flags;' instead.

Or are you referring to the fact that patch 27/27 only checked
libvirt.h.in for additions of '...long flags', to ensure that no more
than the existing 4 uses for migration are added?  In that case, yeah,
that rule can be enhanced to check include/libvirt/libvirt-qemu.h as
well, to ensure that all new public APIs, whether for libvirt proper or
for libvirt-qemu, use 'unsigned int flags'.  But that's a tweak to 27,
not to this one, so I pushed 4/27 as-is.

 
 ACK.
 

-- 
Eric Blake   ebl...@redhat.com+1-801-349-2682
Libvirt virtualization library http://libvirt.org



signature.asc
Description: OpenPGP digital signature
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCHv2 04/27] libvirt-qemu: use unsigned flags

2011-07-08 Thread Eric Blake
Like commit 1740c381, but for libvirt-qemu.

* src/remote/qemu_protocol.x (qemu_monitor_command_args): Adjust
type to match API.
* src/qemu_protocol-structs: Update accordingly.
---

v2: new patch

 src/qemu_protocol-structs  |2 +-
 src/remote/qemu_protocol.x |4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/qemu_protocol-structs b/src/qemu_protocol-structs
index e93e8bf..b124dfa 100644
--- a/src/qemu_protocol-structs
+++ b/src/qemu_protocol-structs
@@ -7,7 +7,7 @@ struct remote_nonnull_domain {
 struct qemu_monitor_command_args {
 remote_nonnull_domain  dom;
 remote_nonnull_string  cmd;
-intflags;
+u_int  flags;
 };
 struct qemu_monitor_command_ret {
 remote_nonnull_string  result;
diff --git a/src/remote/qemu_protocol.x b/src/remote/qemu_protocol.x
index fa453f4..7539e42 100644
--- a/src/remote/qemu_protocol.x
+++ b/src/remote/qemu_protocol.x
@@ -3,7 +3,7 @@
  *   remote_internal driver and libvirtd.  This protocol is
  *   internal and may change at any time.
  *
- * Copyright (C) 2010 Red Hat, Inc.
+ * Copyright (C) 2010-2011 Red Hat, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -30,7 +30,7 @@
 struct qemu_monitor_command_args {
 remote_nonnull_domain dom;
 remote_nonnull_string cmd;
-int flags;
+unsigned int flags;
 };

 struct qemu_monitor_command_ret {
-- 
1.7.4.4

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list