summaryrefslogtreecommitdiffstats
path: root/pcilib
diff options
context:
space:
mode:
authorzilio nicolas <nicolas.zilio@kit.edu>2015-09-04 13:01:14 +0200
committerzilio nicolas <nicolas.zilio@kit.edu>2015-09-04 13:01:14 +0200
commit5459bc4a693e7d149e02c13c086d628aad7e0555 (patch)
tree90949dfdd2b2f35beed2744ec5a2a7289f1707c2 /pcilib
parent57149189cb4e15ed38ee34d44450390955e56697 (diff)
parent4535ac71e075946f374aef0bb1e2997869f148fe (diff)
downloadpcitool-5459bc4a693e7d149e02c13c086d628aad7e0555.tar.gz
pcitool-5459bc4a693e7d149e02c13c086d628aad7e0555.tar.bz2
pcitool-5459bc4a693e7d149e02c13c086d628aad7e0555.tar.xz
pcitool-5459bc4a693e7d149e02c13c086d628aad7e0555.zip
almost finished regarding suren remarks
Diffstat (limited to 'pcilib')
-rw-r--r--pcilib/CMakeLists.txt2
-rw-r--r--pcilib/bar.c1
-rw-r--r--pcilib/error.c1
-rw-r--r--pcilib/fifo.c1
-rw-r--r--pcilib/pci.c1
-rw-r--r--pcilib/xml.c7
6 files changed, 11 insertions, 2 deletions
diff --git a/pcilib/CMakeLists.txt b/pcilib/CMakeLists.txt
index 428f898..4c36141 100644
--- a/pcilib/CMakeLists.txt
+++ b/pcilib/CMakeLists.txt
@@ -2,7 +2,9 @@ include_directories(
${CMAKE_SOURCE_DIR}
${PYTHON_INCLUDE_DIRS}
${XMLLIB_INCLUDE_DIRS}
+ ${CMAKE_BINARY_DIR}
${CMAKE_SOURCE_DIR}/pcilib
+ ${CMAKE_BINARY_DIR}/pcilib
)
set(HEADERS pcilib.h pci.h export.h bar.h fifo.h model.h bank.h register.h
diff --git a/pcilib/bar.c b/pcilib/bar.c
index 2666506..3dc27c9 100644
--- a/pcilib/bar.c
+++ b/pcilib/bar.c
@@ -1,4 +1,5 @@
#define _BSD_SOURCE
+#define _DEFAULT_SOURCE
#define _POSIX_C_SOURCE 200809L
#include <stdio.h>
diff --git a/pcilib/error.c b/pcilib/error.c
index 2c4296e..06af292 100644
--- a/pcilib/error.c
+++ b/pcilib/error.c
@@ -1,4 +1,5 @@
#define _BSD_SOURCE
+#define _DEFAULT_SOURCE
#include <stdio.h>
#include <stdlib.h>
diff --git a/pcilib/fifo.c b/pcilib/fifo.c
index 593400f..7ed87b8 100644
--- a/pcilib/fifo.c
+++ b/pcilib/fifo.c
@@ -1,4 +1,5 @@
#define _BSD_SOURCE
+#define _DEFAULT_SOURCE
#define _POSIX_C_SOURCE 200809L
#include <stdio.h>
diff --git a/pcilib/pci.c b/pcilib/pci.c
index 8a0ee29..3a0073b 100644
--- a/pcilib/pci.c
+++ b/pcilib/pci.c
@@ -1,6 +1,7 @@
//#define PCILIB_FILE_IO
#define _XOPEN_SOURCE 700
#define _BSD_SOURCE
+#define _DEFAULT_SOURCE
#define _POSIX_C_SOURCE 200809L
#include <stdio.h>
diff --git a/pcilib/xml.c b/pcilib/xml.c
index d4c84be..55cdf11 100644
--- a/pcilib/xml.c
+++ b/pcilib/xml.c
@@ -21,6 +21,10 @@
#include "bank.h"
#include "register.h"
#include <libxml/xmlschemastypes.h>
+#include <libxml/tree.h>
+#include <libxml/parser.h>
+#include <libxml/xpath.h>
+#include <libxml/xpathInternals.h>
#include <dirent.h>
#include <errno.h>
@@ -450,7 +454,6 @@ void pcilib_xml_initialize_registers(pcilib_t* pci,xmlDocPtr doc){
xmlChar *type=NULL;
xmlNodePtr mynode;
xmlXPathContextPtr context;
- int number_registers;
pcilib_register_description_t *registers=NULL;
pcilib_register_description_t myregister;
int i,j;
@@ -488,7 +491,7 @@ void pcilib_xml_initialize_registers(pcilib_t* pci,xmlDocPtr doc){
/**we arrange the register for them to be well placed for pci-l*/
pcilib_xml_arrange_registers(registers,nodesetadress->nodeNr+nodesetsubadress->nodeNr);
/**we fille the pcilib_t struct*/
- pcilib_add_registers(pci,number_registers,registers);
+ pcilib_add_registers(pci,nodesetadress->nodeNr+nodesetsubadress->nodeNr,registers);
}