[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Libvir] Removing virDomainRestart typedef



virDomainReboot takes a flag argument which is documented as:

 * @flags: extra flags for the reboot operation, not used yet

In fact, the test driver (alone) allows a virDomainRestart typedef to be passed as a flag, although it's not clear to me that anything actually does pass it. Certainly removing virDomainRestart typedef from <libvirt.h> doesn't break the build, and 'make check' is also OK.

The attached patch moves virDomainRestart typedef into the test driver, which is the only thing using it. Another possibility would be to go further and remove the parts of the test driver which "test" this undocumented feature.

(Thanks to Tóth István for pointing out that this typedef is unused).

Rich.

--
Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom.  Registered in
England and Wales under Company Registration No. 03798903
Index: include/libvirt/libvirt.h
===================================================================
RCS file: /data/cvs/libvirt/include/libvirt/libvirt.h,v
retrieving revision 1.55
diff -u -p -r1.55 libvirt.h
--- include/libvirt/libvirt.h	10 Sep 2007 09:37:10 -0000	1.55
+++ include/libvirt/libvirt.h	12 Sep 2007 09:56:31 -0000
@@ -67,18 +67,6 @@ typedef enum {
 } virDomainState;
 
 /**
- * virDomainRestart:
- *
- * Flags that determine the action to take on a shutdown or crash of a domain
- */
-typedef enum {
-     VIR_DOMAIN_DESTROY	= 1, /* destroy the domain */
-     VIR_DOMAIN_RESTART	= 2, /* restart the domain */
-     VIR_DOMAIN_PRESERVE= 3, /* keep as is, need manual destroy, for debug */
-     VIR_DOMAIN_RENAME_RESTART= 4/* restart under an new unique name */
-} virDomainRestart;
-
-/**
  * virDomainInfoPtr:
  *
  * a virDomainInfo is a structure filled by virDomainGetInfo() and extracting
Index: include/libvirt/libvirt.h.in
===================================================================
RCS file: /data/cvs/libvirt/include/libvirt/libvirt.h.in,v
retrieving revision 1.34
diff -u -p -r1.34 libvirt.h.in
--- include/libvirt/libvirt.h.in	10 Sep 2007 09:37:10 -0000	1.34
+++ include/libvirt/libvirt.h.in	12 Sep 2007 09:56:31 -0000
@@ -67,18 +67,6 @@ typedef enum {
 } virDomainState;
 
 /**
- * virDomainRestart:
- *
- * Flags that determine the action to take on a shutdown or crash of a domain
- */
-typedef enum {
-     VIR_DOMAIN_DESTROY	= 1, /* destroy the domain */
-     VIR_DOMAIN_RESTART	= 2, /* restart the domain */
-     VIR_DOMAIN_PRESERVE= 3, /* keep as is, need manual destroy, for debug */
-     VIR_DOMAIN_RENAME_RESTART= 4/* restart under an new unique name */
-} virDomainRestart;
-
-/**
  * virDomainInfoPtr:
  *
  * a virDomainInfo is a structure filled by virDomainGetInfo() and extracting
Index: src/test.c
===================================================================
RCS file: /data/cvs/libvirt/src/test.c,v
retrieving revision 1.47
diff -u -p -r1.47 test.c
--- src/test.c	21 Aug 2007 10:08:12 -0000	1.47
+++ src/test.c	12 Sep 2007 09:56:33 -0000
@@ -44,6 +44,15 @@
 #include "buf.h"
 #include "uuid.h"
 
+/* Flags that determine the action to take on a shutdown or crash of a domain
+ */
+typedef enum {
+     VIR_DOMAIN_DESTROY	= 1, /* destroy the domain */
+     VIR_DOMAIN_RESTART	= 2, /* restart the domain */
+     VIR_DOMAIN_PRESERVE= 3, /* keep as is, need manual destroy, for debug */
+     VIR_DOMAIN_RENAME_RESTART= 4/* restart under an new unique name */
+} virDomainRestart;
+
 struct _testDev {
     char name[20];
     int mode;

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]