summaryrefslogtreecommitdiffstats
path: root/pcitool
diff options
context:
space:
mode:
Diffstat (limited to 'pcitool')
-rw-r--r--pcitool/CMakeLists.txt1
-rw-r--r--pcitool/cli.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/pcitool/CMakeLists.txt b/pcitool/CMakeLists.txt
index 0c0eef2..2f3639f 100644
--- a/pcitool/CMakeLists.txt
+++ b/pcitool/CMakeLists.txt
@@ -4,6 +4,7 @@ include_directories(
${CMAKE_SOURCE_DIR}/pcilib
${CMAKE_BINARY_DIR}/pcilib
${FASTWRITER_INCLUDE_DIRS}
+ ${LIBXML2_INCLUDE_DIRS}
)
link_directories(
diff --git a/pcitool/cli.c b/pcitool/cli.c
index 7cd8196..2ae569f 100644
--- a/pcitool/cli.c
+++ b/pcitool/cli.c
@@ -3132,7 +3132,7 @@ int main(int argc, char **argv) {
else Usage(argc, argv, "The %i data values is specified, but %i required", argc - optind, size);
case MODE_READ:
if (!addr) {
- if (((!dma_info)||(!dma_info->api))&&(!model_info->api)) {
+ if (((!dma_info)||(!dma_info->api))&&(!model_info->api)&&(!handle->num_reg)) {
// if (model == PCILIB_MODEL_PCI) {
if ((amode != ACCESS_DMA)&&(amode != ACCESS_CONFIG))
Usage(argc, argv, "The address is not specified");