From: Vincent Hanquez Subject: [PATCH 10/11] define errors as an enum instead of define random values. Date: Tue, 29 Dec 2009 18:06:58 +0000 Message-ID: <1262110019-31072-11-git-send-email-vincent.hanquez@eu.citrix.com> References: <1262110019-31072-1-git-send-email-vincent.hanquez@eu.citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------1.6.5.6" Return-path: In-Reply-To: <1262110019-31072-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.5.6 Content-Type: text/plain; charset="UTF-8"; format=fixed Content-Transfer-Encoding: quoted-printable Signed-off-by: Vincent Hanquez --- tools/libxl/libxl.h | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) --------------1.6.5.6 Content-Type: text/x-patch; name="0010-define-errors-as-an-enum-instead-of-define-random-va.patch" Content-Disposition: attachment; filename="0010-define-errors-as-an-enum-instead-of-define-random-va.patch" Content-Transfer-Encoding: quoted-printable diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h index 7bfa4e5..7318b51 100644 --- a/tools/libxl/libxl.h +++ b/tools/libxl/libxl.h @@ -226,10 +226,13 @@ typedef struct { bool power_mgmt; } libxl_device_pci; =20 -#define ERROR_FAIL (-2) -#define ERROR_NI (-101) -#define ERROR_NOMEM (-1032) -#define ERROR_INVAL (-1245) +enum { + ERROR_VERSION =3D -1, + ERROR_FAIL =3D -2, + ERROR_NI =3D -3, + ERROR_NOMEM =3D -4, + ERROR_INVAL =3D -5, +}; =20 /* context functions */ int libxl_ctx_init(struct libxl_ctx *ctx); --------------1.6.5.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.5.6--