[PATCH] cleanup of virDeviceMode

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

 



  Since this was raised yesterday about the purity of the libvirt
API w.r.t. Xen specifics, we don't actually use the virDeviceMode 
nor have any possible use for them at the API level since basically
this kind of informations is always rovided as part of an XML and
never as an int/enum. So I propose to just remove them from the 
headers and API, I don't see how an application could use the enum
but maybe I missed one, in which case please tell me :-)

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
veillard@xxxxxxxxxx  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/
Index: include/libvirt/libvirt.h
===================================================================
RCS file: /data/cvs/libxen/include/libvirt/libvirt.h,v
retrieving revision 1.49
diff -u -p -r1.49 libvirt.h
--- include/libvirt/libvirt.h	9 Jul 2007 12:41:30 -0000	1.49
+++ include/libvirt/libvirt.h	17 Jul 2007 14:41:24 -0000
@@ -77,18 +77,6 @@ typedef enum {
 } virDomainRestart;
 
 /**
- * virDeviceMode:
- *
- * Flags that determine permission to expose a device to the guest
- */
-typedef enum {
-     VIR_DEVICE_DEFAULT	= 0, /* Default mode */
-     VIR_DEVICE_RO	= 1, /* Access read-only */
-     VIR_DEVICE_RW	= 2, /* Access read-write */
-     VIR_DEVICE_RW_FORCE= 3  /* Forced read-write even if already used */
-} virDeviceMode;
-
-/**
  * virDomainInfoPtr:
  *
  * a virDomainInfo is a structure filled by virDomainGetInfo() and extracting
Index: include/libvirt/libvirt.h.in
===================================================================
RCS file: /data/cvs/libxen/include/libvirt/libvirt.h.in,v
retrieving revision 1.30
diff -u -p -r1.30 libvirt.h.in
--- include/libvirt/libvirt.h.in	26 Jun 2007 11:42:46 -0000	1.30
+++ include/libvirt/libvirt.h.in	17 Jul 2007 14:41:24 -0000
@@ -77,18 +77,6 @@ typedef enum {
 } virDomainRestart;
 
 /**
- * virDeviceMode:
- *
- * Flags that determine permission to expose a device to the guest
- */
-typedef enum {
-     VIR_DEVICE_DEFAULT	= 0, /* Default mode */
-     VIR_DEVICE_RO	= 1, /* Access read-only */
-     VIR_DEVICE_RW	= 2, /* Access read-write */
-     VIR_DEVICE_RW_FORCE= 3  /* Forced read-write even if already used */
-} virDeviceMode;
-
-/**
  * virDomainInfoPtr:
  *
  * a virDomainInfo is a structure filled by virDomainGetInfo() and extracting
Index: src/test.c
===================================================================
RCS file: /data/cvs/libxen/src/test.c,v
retrieving revision 1.41
diff -u -p -r1.41 test.c
--- src/test.c	6 Jul 2007 15:02:09 -0000	1.41
+++ src/test.c	17 Jul 2007 14:41:24 -0000
@@ -155,7 +155,7 @@ typedef struct _testPrivate *testPrivate
 
 typedef struct _testDev {
     char name[20];
-    virDeviceMode mode;
+    int mode;
 } testDev;
 
 #define MAX_DEVICES 10
--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]