Explorar el Código

put xml nodes pointers for banks and registers in pcilib_t, compil ok

zilio nicolas hace 8 años
padre
commit
d3678e0fcb
Se han modificado 8 ficheros con 123 adiciones y 113 borrados
  1. 4 2
      pcilib/CMakeLists.txt
  2. 0 1
      pcilib/bank.h
  3. 4 4
      pcilib/pci.c
  4. 3 0
      pcilib/pci.h
  5. 0 1
      pcilib/register.h
  6. 103 97
      pcilib/xml.c
  7. 7 6
      pcilib/xml.h
  8. 2 2
      pcitool/cli.c

+ 4 - 2
pcilib/CMakeLists.txt

@@ -5,8 +5,10 @@ include_directories(
     ${CMAKE_SOURCE_DIR}/pcilib
 )
 
-set(HEADERS pcilib.h pci.h export.h bar.h fifo.h model.h bank.h register.h kmem.h irq.h locking.h lock.h dma.h event.h plugin.h tools.h error.h debug.h env.h version.h config.h)
-add_library(pcilib SHARED pci.c export.c bar.c fifo.c model.c bank.c register.c kmem.c irq.c locking.c lock.c dma.c event.c plugin.c tools.c error.c debug.c env.c )
+set(HEADERS pcilib.h pci.h export.h bar.h fifo.h model.h bank.h register.h
+kmem.h irq.h locking.h lock.h dma.h event.h plugin.h tools.h error.h debug.h
+env.h version.h config.h xml.h)
+add_library(pcilib SHARED pci.c export.c bar.c fifo.c model.c bank.c register.c kmem.c irq.c locking.c lock.c dma.c event.c plugin.c tools.c error.c debug.c env.c xml.c)
 target_link_libraries(pcilib dma protocols ${CMAKE_THREAD_LIBS_INIT} ${UFODECODE_LIBRARIES} ${CMAKE_DL_LIBS} ${EXTRA_SYSTEM_LIBS} ${XMLLIB_LIBRARIES} ${PYTHON_LIBRARIES})
 
 add_dependencies(pcilib dma protocols)

+ 0 - 1
pcilib/bank.h

@@ -62,7 +62,6 @@ typedef struct {
     const char *format;								/**< printf format for the registers, either %lu for decimal output or 0x%lx for hexdecimal */
     const char *name;								/**< short bank name */
     const char *description;							/**< longer bank description */
-	/* use it or not?*/	/*xmlNodePtr xmlNode;*/				/**<pointer to xmlNode of the bank in the file*/
 } pcilib_register_bank_description_t;
 
 /**

+ 4 - 4
pcilib/pci.c

@@ -193,13 +193,13 @@ pcilib_t *pcilib_open(const char *device, const char *model) {
 	    ctx->model = strdup(model?model:"pci");
 
 	if(banks){
-		pcilib_xml_initialize_banks(doc,banks);
-		pcilib_add_register_banks(ctx,number_banks,banks);
+	    pcilib_xml_initialize_banks(ctx,doc,banks);
+	    pcilib_add_register_banks(ctx,number_banks,banks);
 	}else pcilib_error("no memory for banks");
 
 	if(registers){
-		pcilib_xml_initialize_registers(doc,registers);
-		pcilib_xml_arrange_registers(registers,number_registers);
+	    pcilib_xml_initialize_registers(ctx,doc,registers);
+	    pcilib_xml_arrange_registers(registers,number_registers);
 	    pcilib_add_registers(ctx,number_registers,registers);
 	}else pcilib_error("no memory for registers");
 	

+ 3 - 0
pcilib/pci.h

@@ -25,6 +25,7 @@
 #include "model.h"
 #include "export.h"
 #include "locking.h"
+#include <libxml/tree.h>
 
 typedef struct {
     uint8_t max_link_speed, link_speed;
@@ -71,6 +72,8 @@ struct pcilib_s {
     pcilib_register_bank_context_t *bank_ctx[PCILIB_MAX_REGISTER_BANKS];		/**< Contexts for registers banks if required by register protocol */
     pcilib_dma_context_t *dma_ctx;							/**< DMA context */
     pcilib_context_t *event_ctx;							/**< Implmentation context */
+    xmlNodePtr* banks_xml_nodes;				                                /**<pointer to xml nodes of banks in the xml file*/
+    xmlNodePtr* registers_xml_nodes;                                                     /**< pointer to xml nodes of registers in the xml file*/
 
     pcilib_lock_t *dma_rlock[PCILIB_MAX_DMA_ENGINES];					/**< Per-engine locks to serialize streaming and read operations */
     pcilib_lock_t *dma_wlock[PCILIB_MAX_DMA_ENGINES];					/**< Per-engine locks to serialize write operations */

+ 0 - 1
pcilib/register.h

@@ -40,7 +40,6 @@ typedef struct {
     
     const char *name;				/**< The access name of the register */
     const char *description;			/**< Brief description of the register */
-	/* use it or not? */ /*xmlNodePtr xmlNode;*/			/**<pointer to the corresponding node in the xml file*/
 } pcilib_register_description_t;
 
 

+ 103 - 97
pcilib/xml.c

@@ -18,7 +18,7 @@
 #include <string.h>
 #include <assert.h>
 #include <Python.h>
-
+#include "pci.h"
 //#define VIEW_OK
 //#define UNIT_OK
 
@@ -90,9 +90,8 @@ xmlXPathContextPtr pcilib_xml_getcontext(xmlDocPtr doc){
  * @param[in] bank the bank of the future register
  * @param[in]  name the name of the future register
  * @param[in] description the description of the future register
- * @param[in] node the current xmlNode in the xml of the future register
  */
-void pcilib_xml_create_register(pcilib_register_description_t *myregister,xmlChar* adress, xmlChar *offset, xmlChar *size, xmlChar *defvalue, xmlChar *rwmask, xmlChar *mode, xmlChar *type, xmlChar *bank, xmlChar *name, xmlChar *description, xmlNodePtr node){
+void pcilib_xml_create_register(pcilib_register_description_t *myregister,xmlChar* adress, xmlChar *offset, xmlChar *size, xmlChar *defvalue, xmlChar *rwmask, xmlChar *mode, xmlChar *type, xmlChar *bank, xmlChar *name, xmlChar *description){
 		
 		char* ptr;
         
@@ -153,8 +152,6 @@ void pcilib_xml_create_register(pcilib_register_description_t *myregister,xmlCha
 		
 		myregister->name=(char*)name;
 		myregister->description=(char*)description;
-		/*should we include those xmlnodes?*/
-		//myregister->xmlNode=node;
 }	
 
 /** pcilib_xml_getnumberbanks
@@ -172,6 +169,90 @@ int pcilib_xml_getnumberbanks(xmlXPathContextPtr doc){
 	return nodesetadress->nodeNr; /**< we then return the number of said nodes */
 }
 
+/** pcilib_xml_create_bank
+ * 
+ * this function create a bank structure from the results of xml parsing
+ * @param[out] mybank the created bank.
+ * @param[in] adress the adress of the bank that will be created.
+ * @param[in] bar the bar of the bank that will be created.
+ * @param[in] size the size of the bank that will be created.
+ * @param[in] protocol the protocol of the bank that will be created.
+ * @param[in] read_addr the read adress for protocol of the bank that will be created.
+ * @param[in] write_addr the write adress for the protocol of the bank that will be created.
+ * @param[in] access the word size of the bank that will be created.
+ * @param[in] endianess the endianess of the bank that will be created.
+ * @param[in] format the format of the bank that will be created.
+ * @param[in] name the name of the bank that will be created.
+ * @param[in] description the description of the bank that will be created.
+ */
+void pcilib_xml_create_bank(pcilib_register_bank_description_t *mybank,xmlChar* adress, xmlChar *bar, xmlChar *size, xmlChar *protocol, xmlChar *read_addr, xmlChar *write_addr, xmlChar *access, xmlChar *endianess, xmlChar *format, xmlChar *name,xmlChar *description){
+		
+		char* ptr;
+
+		/** we recreate each sub property of banks' structure given the results of xml parsing
+            note : strtol is used here to get hexadecimal and decimal values from the xml file as well*/
+
+		if (strcmp((char*)adress,"bank 0")==0){
+				mybank->addr=PCILIB_REGISTER_BANK0;
+		}else if (strcmp((char*)adress,"bank 1")==0){
+			    mybank->addr=PCILIB_REGISTER_BANK1;
+	    }else if (strcmp((char*)adress,"bank 2")==0){
+	            mybank->addr=PCILIB_REGISTER_BANK2;
+	    }else if (strcmp((char*)adress,"bank 3")==0){
+	            mybank->addr=PCILIB_REGISTER_BANK3;
+	    }else if (strcmp((char*)adress,"DMA bank")==0){
+	            mybank->addr=PCILIB_REGISTER_BANK_DMA;
+	    }else if (strcmp((char*)adress,"DMAconf bank")==0){
+	            mybank->addr=PCILIB_REGISTER_BANK_DMACONF;
+	    }else if (strcmp((char*)adress,"dynamic bank")==0){
+	            mybank->addr=PCILIB_REGISTER_BANK_DYNAMIC;
+		}else{
+				mybank->addr=PCILIB_REGISTER_BANK_INVALID;
+		}
+		
+		if(strcmp((char*)bar,"0")==0){
+			mybank->bar=PCILIB_BAR0;
+		}else if(strcmp((char*)bar,"1")==0){
+			mybank->bar=PCILIB_BAR1;
+		}else if(strcmp((char*)bar,"no_bar")==0){
+			mybank->bar=PCILIB_BAR_NOBAR;
+		}else{
+		  mybank->bar=PCILIB_BAR_INVALID;
+		}
+		
+		mybank->bar=(pcilib_bar_t)strtol((char*)bar,&ptr,0);
+		mybank->size=(size_t)strtol((char*)size,&ptr,0);
+		
+		if(strcmp((char*)protocol,"default")==0){
+			mybank->protocol=PCILIB_REGISTER_PROTOCOL_DEFAULT;
+		}else if(strcmp((char*)protocol,"0")==0){
+			mybank->protocol=PCILIB_REGISTER_PROTOCOL0;
+		}else if(strcmp((char*)protocol,"dma")==0){
+			mybank->protocol=PCILIB_REGISTER_PROTOCOL_DMA;
+		}else if(strcmp((char*)protocol,"dynamic")==0){
+			mybank->protocol=PCILIB_REGISTER_PROTOCOL_DYNAMIC;
+		}else if (strcmp((char*)protocol,"software")==0){
+			mybank->protocol=PCILIB_REGISTER_PROTOCOL_SOFTWARE;
+		}else mybank->protocol=PCILIB_REGISTER_PROTOCOL_INVALID;
+		
+		mybank->read_addr=(uintptr_t)strtol((char*)read_addr,&ptr,0);
+		mybank->write_addr=(uintptr_t)strtol((char*)write_addr,&ptr,0);
+		mybank->access=(uint8_t)strtol((char*)access,&ptr,0);
+		
+		if(strcmp((char*)endianess,"little")==0){
+			mybank->endianess=PCILIB_LITTLE_ENDIAN;
+		}else if(strcmp((char*)endianess,"big")==0){
+			mybank->endianess=PCILIB_BIG_ENDIAN;
+		}else if(strcmp((char*)endianess,"host")==0){
+			mybank->endianess=PCILIB_HOST_ENDIAN;
+		}		
+		mybank->format=(char*)format;
+		mybank->raw_endianess=mybank->endianess;
+
+		mybank->name=(char*)name;
+		mybank->description=(char*)description;
+}	
+
 /** pcilib_xml_initialize_banks
  * 
  * function to create the structures to store the banks from the AST 
@@ -179,7 +260,7 @@ int pcilib_xml_getnumberbanks(xmlXPathContextPtr doc){
  * @param[in] doc the AST of the xml file.
  * @param[in,out] mybanks the structure containing the banks.
  */
-void pcilib_xml_initialize_banks(xmlDocPtr doc, pcilib_register_bank_description_t* mybanks){
+void pcilib_xml_initialize_banks(pcilib_t* pci, xmlDocPtr doc, pcilib_register_bank_description_t* mybanks){
 	pcilib_register_bank_description_t mybank;
 
 	xmlNodeSetPtr nodesetadress=NULL,nodesetbar=NULL,nodesetsize=NULL,nodesetprotocol=NULL,nodesetread_addr=NULL,nodesetwrite_addr=NULL,nodesetaccess=NULL,nodesetendianess=NULL,nodesetformat=NULL,nodesetname=NULL,nodesetdescription=NULL;
@@ -239,7 +320,10 @@ void pcilib_xml_initialize_banks(xmlDocPtr doc, pcilib_register_bank_description
 
 	temp=pcilib_xml_getsetproperty(context,BANK_DESCRIPTION_PATH);
 	if(temp!=NULL)nodesetdescription=temp->nodesetval;
-		
+	
+	pci->banks_xml_nodes=calloc(nodesetadress->nodeNr,sizeof(xmlNodePtr));
+	if(!(pci->banks_xml_nodes)) pcilib_warning("can't create bank xml nodes for pcilib_t struct");
+	
 	for(i=0;i<nodesetadress->nodeNr;i++){
 	  /** we then get each node from the structures above*/
 		adress=xmlNodeListGetString(doc,nodesetadress->nodeTab[i]->xmlChildrenNode, 1);
@@ -255,99 +339,16 @@ void pcilib_xml_initialize_banks(xmlDocPtr doc, pcilib_register_bank_description
 		description=xmlNodeListGetString(doc,nodesetdescription->nodeTab[i]->xmlChildrenNode, 1);
 
 		mynode=nodesetadress->nodeTab[i]->parent;
+
 		/** the following function will create the given structure for banks*/
-		pcilib_xml_create_bank(&mybank,adress,bar,size,protocol,read_addr,write_addr,access,endianess,format, name, description,mynode);
+		pcilib_xml_create_bank(&mybank,adress,bar,size,protocol,read_addr,write_addr,access,endianess,format, name, description);
 		mybanks[i]=mybank;
+		pci->banks_xml_nodes[i]=mynode;
+
 	}
 
 }
 
-/** pcilib_xml_create_bank
- * 
- * this function create a bank structure from the results of xml parsing
- * @param[out] mybank the created bank.
- * @param[in] adress the adress of the bank that will be created.
- * @param[in] bar the bar of the bank that will be created.
- * @param[in] size the size of the bank that will be created.
- * @param[in] protocol the protocol of the bank that will be created.
- * @param[in] read_addr the read adress for protocol of the bank that will be created.
- * @param[in] write_addr the write adress for the protocol of the bank that will be created.
- * @param[in] access the word size of the bank that will be created.
- * @param[in] endianess the endianess of the bank that will be created.
- * @param[in] format the format of the bank that will be created.
- * @param[in] name the name of the bank that will be created.
- * @param[in] description the description of the bank that will be created.
- * @param[in] node the xmlNodeptr referring to the bank_description node of the bank that will be created.
- */
-void pcilib_xml_create_bank(pcilib_register_bank_description_t *mybank,xmlChar* adress, xmlChar *bar, xmlChar *size, xmlChar *protocol, xmlChar *read_addr, xmlChar *write_addr, xmlChar *access, xmlChar *endianess, xmlChar *format, xmlChar *name,xmlChar *description, xmlNodePtr node){
-		
-		char* ptr;
-
-		/** we recreate each sub property of banks' structure given the results of xml parsing
-            note : strtol is used here to get hexadecimal and decimal values from the xml file as well*/
-
-		if (strcmp((char*)adress,"bank 0")==0){
-				mybank->addr=PCILIB_REGISTER_BANK0;
-		}else if (strcmp((char*)adress,"bank 1")==0){
-			    mybank->addr=PCILIB_REGISTER_BANK1;
-	    }else if (strcmp((char*)adress,"bank 2")==0){
-	            mybank->addr=PCILIB_REGISTER_BANK2;
-	    }else if (strcmp((char*)adress,"bank 3")==0){
-	            mybank->addr=PCILIB_REGISTER_BANK3;
-	    }else if (strcmp((char*)adress,"DMA bank")==0){
-	            mybank->addr=PCILIB_REGISTER_BANK_DMA;
-	    }else if (strcmp((char*)adress,"DMAconf bank")==0){
-	            mybank->addr=PCILIB_REGISTER_BANK_DMACONF;
-	    }else if (strcmp((char*)adress,"dynamic bank")==0){
-	            mybank->addr=PCILIB_REGISTER_BANK_DYNAMIC;
-		}else{
-				mybank->addr=PCILIB_REGISTER_BANK_INVALID;
-		}
-		
-		if(strcmp((char*)bar,"0")==0){
-			mybank->bar=PCILIB_BAR0;
-		}else if(strcmp((char*)bar,"1")==0){
-			mybank->bar=PCILIB_BAR1;
-		}else if(strcmp((char*)bar,"no_bar")==0){
-			mybank->bar=PCILIB_BAR_NOBAR;
-		}else{
-		  mybank->bar=PCILIB_BAR_INVALID;
-		}
-		
-		mybank->bar=(pcilib_bar_t)strtol((char*)bar,&ptr,0);
-		mybank->size=(size_t)strtol((char*)size,&ptr,0);
-		
-		if(strcmp((char*)protocol,"default")==0){
-			mybank->protocol=PCILIB_REGISTER_PROTOCOL_DEFAULT;
-		}else if(strcmp((char*)protocol,"0")==0){
-			mybank->protocol=PCILIB_REGISTER_PROTOCOL0;
-		}else if(strcmp((char*)protocol,"dma")==0){
-			mybank->protocol=PCILIB_REGISTER_PROTOCOL_DMA;
-		}else if(strcmp((char*)protocol,"dynamic")==0){
-			mybank->protocol=PCILIB_REGISTER_PROTOCOL_DYNAMIC;
-		}else if (strcmp((char*)protocol,"software")==0){
-			mybank->protocol=PCILIB_REGISTER_PROTOCOL_SOFTWARE;
-		}else mybank->protocol=PCILIB_REGISTER_PROTOCOL_INVALID;
-		
-		mybank->read_addr=(uintptr_t)strtol((char*)read_addr,&ptr,0);
-		mybank->write_addr=(uintptr_t)strtol((char*)write_addr,&ptr,0);
-		mybank->access=(uint8_t)strtol((char*)access,&ptr,0);
-		
-		if(strcmp((char*)endianess,"little")==0){
-			mybank->endianess=PCILIB_LITTLE_ENDIAN;
-		}else if(strcmp((char*)endianess,"big")==0){
-			mybank->endianess=PCILIB_BIG_ENDIAN;
-		}else if(strcmp((char*)endianess,"host")==0){
-			mybank->endianess=PCILIB_HOST_ENDIAN;
-		}		
-		mybank->format=(char*)format;
-		mybank->raw_endianess=mybank->endianess;
-
-		mybank->name=(char*)name;
-		mybank->description=(char*)description;
-		/* to include or not?*/
-		//mybank->xmlNode=node;
-}	
 
 
 /** pcilib_xml_getnumberregisters
@@ -380,7 +381,7 @@ int pcilib_xml_getnumberregisters(xmlXPathContextPtr doc){
  * @param[in] doc the xpath context of the xml file.
  * @param[in,out] registers in: initialized list out: the list of the created registers.
  */
-void pcilib_xml_initialize_registers(xmlDocPtr doc,pcilib_register_description_t *registers){
+void pcilib_xml_initialize_registers(pcilib_t* pci, xmlDocPtr doc,pcilib_register_description_t *registers){
 	
 	xmlNodeSetPtr nodesetadress=NULL,nodesetoffset=NULL,nodesetdefvalue=NULL,nodesetrwmask=NULL,nodesetsize=NULL,nodesetmode=NULL,nodesetname=NULL;
 	xmlChar *adress=NULL,*offset=NULL,*defvalue=NULL,*rwmask=NULL,*size=NULL,*mode=NULL,*name=NULL,*bank=NULL,*type=NULL,*description=NULL;
@@ -446,6 +447,9 @@ void pcilib_xml_initialize_registers(xmlDocPtr doc,pcilib_register_description_t
 	pcilib_register_description_t myregister;
 	
 	int i,j;
+	
+	pci->registers_xml_nodes=calloc(nodesetadress->nodeNr+nodesetsuboffset->nodeNr,sizeof(xmlNodePtr));
+	if(!(pci->registers_xml_nodes)) pcilib_warning("can't create registers xml nodes in pcilib_t struct");
 		
 	for(i=0;i<nodesetadress->nodeNr;i++){
 	  /** get each sub property of each standard registers*/
@@ -467,8 +471,9 @@ void pcilib_xml_initialize_registers(xmlDocPtr doc,pcilib_register_description_t
 		}
 		mynode=nodesetadress->nodeTab[i]->parent;
 		/**creation of a register with the given previous properties*/
-		pcilib_xml_create_register(&myregister,adress,offset,size,defvalue,rwmask,mode, type, bank, name, description,mynode);
+		pcilib_xml_create_register(&myregister,adress,offset,size,defvalue,rwmask,mode, type, bank, name, description);
 		registers[i]=myregister;
+		pci->registers_xml_nodes[i]=mynode;
 	}
 	
 	j=i;
@@ -497,8 +502,9 @@ void pcilib_xml_initialize_registers(xmlDocPtr doc,pcilib_register_description_t
 		}
 		mynode=nodesetsuboffset->nodeTab[i]->parent;
 		/** creation of a bits register given the previous properties*/
-		pcilib_xml_create_register(&myregister,subadress,suboffset,subsize,subdefvalue,subrwmask,submode, subtype, subbank, subname, subdescription,mynode);
+		pcilib_xml_create_register(&myregister,subadress,suboffset,subsize,subdefvalue,subrwmask,submode, subtype, subbank, subname, subdescription);
 		registers[i+j]=myregister;
+		pci->registers_xml_nodes[i+j]=mynode;
 	}
 }
 

+ 7 - 6
pcilib/xml.h

@@ -26,7 +26,7 @@
 #include "register.h"
 #include "model.h"
 #include "bank.h"
-
+#include "pci.h"
 //#include <Python.h>
 
 #define REGISTERS_PATH ((xmlChar*)"/model/banks/bank/registers/register") /**<all standard registers nodes.*/
@@ -106,7 +106,7 @@ xmlXPathObjectPtr pcilib_xml_getsetproperty(xmlXPathContextPtr doc, xmlChar *xpa
  * @param[in] doc the xpath context of the xml file.
  * @param[out] registers out: the list of the created registers.
  */
-void pcilib_xml_initialize_registers(xmlDocPtr doc,pcilib_register_description_t *registers);
+void pcilib_xml_initialize_registers(pcilib_t* pci, xmlDocPtr doc,pcilib_register_description_t *registers);
 
 /**
  * this function get the numbers of registers in the xml file for further malloc and xml checking.
@@ -129,7 +129,7 @@ void pcilib_xml_arrange_registers(pcilib_register_description_t *registers,int s
  * @param[in] doc the AST of the xml file.
  * @param[in,out] mybanks the structure containing the banks.
  */
-void pcilib_xml_initialize_banks(xmlDocPtr doc, pcilib_register_bank_description_t* mybanks);
+void pcilib_xml_initialize_banks(pcilib_t* pci,xmlDocPtr doc, pcilib_register_bank_description_t* mybanks);
 
 /**
  * this function create a bank from the informations gathered in the xml.
@@ -146,8 +146,9 @@ void pcilib_xml_initialize_banks(xmlDocPtr doc, pcilib_register_bank_description
  * @param[in] name the name of the bank that will be created.
  * @param[in] description the description of the bank that will be created.
  * @param[in] node the xmlNodeptr referring to the bank_description node of the bank that will be created.
- */
+ *
 void pcilib_xml_create_bank(pcilib_register_bank_description_t *mybank,xmlChar* adress, xmlChar *bar, xmlChar *size, xmlChar *protocol,xmlChar *read_addr, xmlChar *write_addr, xmlChar *access, xmlChar *endianess, xmlChar *format, xmlChar *name,xmlChar *description, xmlNodePtr node);
+*/
 
 /**
  * this function get the numbers of banks in the xml file for further malloc and xml checking.
@@ -204,7 +205,7 @@ void pcilib_xml_init_nodeset_bank_ctx(pcilib_register_bank_context_t *ctx);
  * @param[in]  name the name of the future register
  * @param[in] description the description of the future register
  * @param[in] node the current xmlNode in the xml of the future register
- */
-void pcilib_xml_create_register(pcilib_register_description_t *myregister,xmlChar* adress, xmlChar *offset, xmlChar *size, xmlChar *defvalue, xmlChar *rwmask, xmlChar *mode, xmlChar *type, xmlChar *bank, xmlChar *name, xmlChar *description, xmlNodePtr node);
+ *
+ void pcilib_xml_create_register(pcilib_register_description_t *myregister,xmlChar* adress, xmlChar *offset, xmlChar *size, xmlChar *defvalue, xmlChar *rwmask, xmlChar *mode, xmlChar *type, xmlChar *bank, xmlChar *name, xmlChar *description, xmlNodePtr node);*/
 
 #endif /*_XML_*/

+ 2 - 2
pcitool/cli.c

@@ -93,7 +93,7 @@ typedef enum {
     MODE_LIST_KMEM,
     MODE_READ_KMEM,
     MODE_FREE_KMEM,
-    MODE_VALIDATE_XML
+    MODE_VALIDATE_XML,
     MODE_LIST_LOCKS,
     MODE_FREE_LOCKS,
     MODE_LOCK,
@@ -143,7 +143,7 @@ typedef enum {
     OPT_GRAB = 'g',
     OPT_QUIETE = 'q',
     OPT_HELP = 'h',
-	OPT_VALIDATE_XML= 'v',
+    OPT_VALIDATE_XML= 'v',
     OPT_RESET = 128,
     OPT_BENCHMARK,
     OPT_TRIGGER,