From 7a968beb4682f4304ac9f17cbb7a4612c28aadb9 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 11 Mar 2013 12:34:22 +0000 Subject: [PATCH] lib: Give values for each state in 'enum state'. The values of CONFIG, LAUNCHING and READY and (kind of) exposed through the API so shouldn't change. Use a bad sentinel for NO_HANDLE since that indicates a serious error. --- src/guestfs-internal.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/guestfs-internal.h b/src/guestfs-internal.h index 614542440..68de6afea 100644 --- a/src/guestfs-internal.h +++ b/src/guestfs-internal.h @@ -90,7 +90,8 @@ /* Guestfs handle and associated structures. */ /* State. */ -enum state { CONFIG, LAUNCHING, READY, NO_HANDLE }; +enum state { CONFIG = 0, LAUNCHING = 1, READY = 2, + NO_HANDLE = 0xebadebad }; /* Attach method. */ enum attach_method {