From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vincent Hanquez Subject: [PATCH 2/5] initialize enum to 1, to prevent defaulting to the 0 values when structure when not properly initialized by the client. Date: Wed, 13 Jan 2010 16:14:52 +0000 Message-ID: <1263399295-19453-3-git-send-email-vincent.hanquez@eu.citrix.com> References: <1263399295-19453-1-git-send-email-vincent.hanquez@eu.citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------1.6.6" Return-path: In-Reply-To: <1263399295-19453-1-git-send-email-vincent.hanquez@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: Vincent Hanquez List-Id: xen-devel@lists.xenproject.org --------------1.6.6 Content-Type: text/plain; charset="UTF-8"; format=fixed Content-Transfer-Encoding: quoted-printable Signed-off-by: Vincent Hanquez --- tools/libxl/libxl.h | 6 +++--- tools/libxl/libxl_internal.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) --------------1.6.6 Content-Type: text/x-patch; name="0002-initialize-enum-to-1-to-prevent-defaulting-to-the-0-.patch" Content-Disposition: attachment; filename="0002-initialize-enum-to-1-to-prevent-defaulting-to-the-0-.patch" Content-Transfer-Encoding: quoted-printable diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h index 529dbd6..25a66d9 100644 --- a/tools/libxl/libxl.h +++ b/tools/libxl/libxl.h @@ -104,7 +104,7 @@ typedef struct { } libxl_domain_suspend_info; =20 typedef enum { - XENFV, + XENFV =3D 1, XENPV, } libxl_qemu_machine_type; =20 @@ -169,7 +169,7 @@ typedef struct { } libxl_device_console; =20 typedef enum { - PHYSTYPE_QCOW, + PHYSTYPE_QCOW =3D 1, PHYSTYPE_QCOW2, PHYSTYPE_VHD, PHYSTYPE_AIO, @@ -189,7 +189,7 @@ typedef struct { } libxl_device_disk; =20 typedef enum { - NICTYPE_IOEMU, + NICTYPE_IOEMU =3D 1, NICTYPE_VIF, } libxl_nic_type; =20 diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h index 7664e59..11698bc 100644 --- a/tools/libxl/libxl_internal.h +++ b/tools/libxl/libxl_internal.h @@ -59,7 +59,7 @@ void xl_log(struct libxl_ctx *ctx, int errnoval, int lo= glevel, const char *file, =20 =20 typedef enum { - DEVICE_VIF, + DEVICE_VIF =3D 1, DEVICE_VBD, DEVICE_TAP, DEVICE_PCI, --------------1.6.6 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------1.6.6--