summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorroot <root@ipepdvpc4>2011-07-27 11:49:26 +0200
committerroot <root@ipepdvpc4>2011-07-27 11:49:26 +0200
commit9b5ceef2b3b914bfe49e255b5a5d88db94739301 (patch)
treec6ce6c98c5304b56a11419e168dbef7df4225474
parent093a3ad25ec0eca3d7a535a2d054b15f7ce1f757 (diff)
downloadpcitool-9b5ceef2b3b914bfe49e255b5a5d88db94739301.tar.gz
pcitool-9b5ceef2b3b914bfe49e255b5a5d88db94739301.tar.bz2
pcitool-9b5ceef2b3b914bfe49e255b5a5d88db94739301.tar.xz
pcitool-9b5ceef2b3b914bfe49e255b5a5d88db94739301.zip
Print propper number of strings in cli in case of DMA read
-rw-r--r--cli.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/cli.c b/cli.c
index cdbf9be..7ac4a09 100644
--- a/cli.c
+++ b/cli.c
@@ -582,6 +582,7 @@ int ReadData(pcilib_t *handle, ACCESS_MODE mode, pcilib_dma_engine_addr_t dma, p
err = pcilib_read_dma(handle, dmaid, addr, size, buf, &ret);
if ((err)||(ret <= 0)) Error("No data is returned by DMA engine");
size = ret;
+ n = ret / abs(access);
addr = 0;
break;
case ACCESS_FIFO: