On Wed, Apr 10, 2013 at 08:56:03PM -0600, Eric Blake wrote:
On 04/10/2013 04:08 AM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange(a)redhat.com>
>
> Rename all the virCgroupForXXX methods to use the form
> virCgroupNewXXX since they are all constructors. Also
> make sure the output parameter is the last one in the
> list, and annotate all pointers as non-null. Fix up
> all callers, and make sure they use true/false not 0/1
> for the boolean parameters
>
> Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
> ---
> src/libvirt_private.syms | 10 +++---
> src/lxc/lxc_cgroup.c | 6 ++--
> src/qemu/qemu_cgroup.c | 14 ++++----
> src/qemu/qemu_driver.c | 18 +++++------
> src/util/vircgroup.c | 84 ++++++++++++++++++++++--------------------------
> src/util/vircgroup.h | 33 +++++++++++--------
> 6 files changed, 82 insertions(+), 83 deletions(-)
>
> @@ -935,11 +935,11 @@ cleanup:
> * Returns 0 on success
> */
> #if defined HAVE_MNTENT_H && defined HAVE_GETMNTENT_R
> -int virCgroupForDriver(const char *name,
> - virCgroupPtr *group,
> +int virCgroupNewDriver(const char *name,
Is it worth formatting like
int
virCgroupNewDriver(...
as long as you are touching that?
Hmm, there are a huge number of fnuctions in the file
which would want updating if we did that. I'm starting
to think that if we want to enforce this style, we
need to try and get a 'syntax-check' script to validate
this, otherwise it is a fairly tough battle to win.
ACK, whether or not you fix up my minor findings now or in a later
patch.
Fixing the missing docs for the @create args before pushing.
Daniel
--
|:
http://berrange.com -o-
http://www.flickr.com/photos/dberrange/ :|
|:
http://libvirt.org -o-
http://virt-manager.org :|
|:
http://autobuild.org -o-
http://search.cpan.org/~danberr/ :|
|:
http://entangle-photo.org -o-
http://live.gnome.org/gtk-vnc :|