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.
This commit is contained in:
Richard W.M. Jones
2013-03-11 12:34:22 +00:00
parent 99e5ffd1de
commit 7a968beb46

View File

@@ -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 {