[libvirt] [PATCH v1 2/3] virConfType: switch to VIR_ENUM_{DECL, IMPL}

Martin Kletzander mkletzan at redhat.com
Wed Dec 10 07:16:38 UTC 2014


On Tue, Dec 09, 2014 at 04:52:15PM +0100, Michal Privoznik wrote:
>There's no need to implement ToString() function like we do if we
>can use our shiny macros.
>
>Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
>---
> daemon/libvirtd-config.c         |  4 ++--
> src/libvirt_private.syms         |  2 ++
> src/locking/lock_daemon_config.c |  4 ++--
> src/util/virconf.c               |  6 ++++++
> src/util/virconf.h               | 28 +++++++++-------------------
> 5 files changed, 21 insertions(+), 23 deletions(-)
>

[...]

>diff --git a/src/util/virconf.h b/src/util/virconf.h
>index 2a6b050..6176d43 100644
>--- a/src/util/virconf.h
>+++ b/src/util/virconf.h
>@@ -23,6 +23,8 @@
> #ifndef __VIR_CONF_H__
> # define __VIR_CONF_H__
>
>+# include "virutil.h"
>+
> /**
>  * virConfType:
>  * one of the possible type for a value from the configuration file
>@@ -30,12 +32,15 @@
>  * TODO: we probably need a float too.
>  */
> typedef enum {
>-    VIR_CONF_NONE = 0,		/* undefined */
>-    VIR_CONF_LONG = 1,		/* a long int */
>-    VIR_CONF_STRING = 2,	/* a string */
>-    VIR_CONF_LIST = 3		/* a list */
>+    VIR_CONF_NONE = 0,      /* undefined */
>+    VIR_CONF_LONG,          /* a long int */
>+    VIR_CONF_STRING,        /* a string */
>+    VIR_CONF_LIST,          /* a list */

Could you add an empty line here before the sentinel?

ACK with that changed.

>+    VIR_CONF_LAST,          /* sentinel */
> } virConfType;
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20141210/456b4657/attachment-0001.sig>


More information about the libvir-list mailing list