xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
To: xen-devel@lists.xensource.com
Cc: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
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	[thread overview]
Message-ID: <1263399295-19453-3-git-send-email-vincent.hanquez@eu.citrix.com> (raw)
In-Reply-To: <1263399295-19453-1-git-send-email-vincent.hanquez@eu.citrix.com>

[-- Attachment #1: Type: text/plain, Size: 210 bytes --]


Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
---
 tools/libxl/libxl.h          |    6 +++---
 tools/libxl/libxl_internal.h |    2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0002-initialize-enum-to-1-to-prevent-defaulting-to-the-0-.patch --]
[-- Type: text/x-patch; name="0002-initialize-enum-to-1-to-prevent-defaulting-to-the-0-.patch", Size: 1060 bytes --]

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;
 
 typedef enum {
-    XENFV,
+    XENFV = 1,
     XENPV,
 } libxl_qemu_machine_type;
 
@@ -169,7 +169,7 @@ typedef struct {
 } libxl_device_console;
 
 typedef enum {
-    PHYSTYPE_QCOW,
+    PHYSTYPE_QCOW = 1,
     PHYSTYPE_QCOW2,
     PHYSTYPE_VHD,
     PHYSTYPE_AIO,
@@ -189,7 +189,7 @@ typedef struct {
 } libxl_device_disk;
 
 typedef enum {
-    NICTYPE_IOEMU,
+    NICTYPE_IOEMU = 1,
     NICTYPE_VIF,
 } libxl_nic_type;
 
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 loglevel, const char *file,
 
 
 typedef enum {
-    DEVICE_VIF,
+    DEVICE_VIF = 1,
     DEVICE_VBD,
     DEVICE_TAP,
     DEVICE_PCI,

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

  parent reply	other threads:[~2010-01-13 16:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-13 16:14 [PATCH 0/5] more solidification work Vincent Hanquez
2010-01-13 16:14 ` [PATCH 1/5] add some return values testing in stubdom Vincent Hanquez
2010-01-13 16:14 ` Vincent Hanquez [this message]
2010-01-13 16:14 ` [PATCH 3/5] add fuse around generic_device_add related to invalid kinds Vincent Hanquez
2010-01-13 16:14 ` [PATCH 4/5] add error in disk_add if phystype is not recognized Vincent Hanquez
2010-01-13 16:14 ` [PATCH 5/5] fix name to domid conversion Vincent Hanquez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1263399295-19453-3-git-send-email-vincent.hanquez@eu.citrix.com \
    --to=vincent.hanquez@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).