summaryrefslogtreecommitdiffstats
path: root/cli.c
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@dside.dyndns.org>2011-07-19 17:59:25 +0200
committerSuren A. Chilingaryan <csa@dside.dyndns.org>2011-07-19 17:59:25 +0200
commitb646194911cd70e91e84c8354d5bac35b27156df (patch)
tree81a9b56faa50eaf04981ae9f756a5b84e4f4ba24 /cli.c
parent9e424252a35879f121e7ea4531a9ab3dda56d595 (diff)
downloadipecamera-b646194911cd70e91e84c8354d5bac35b27156df.tar.gz
ipecamera-b646194911cd70e91e84c8354d5bac35b27156df.tar.bz2
ipecamera-b646194911cd70e91e84c8354d5bac35b27156df.tar.xz
ipecamera-b646194911cd70e91e84c8354d5bac35b27156df.zip
Few fixes for IPE Camera modification
Diffstat (limited to 'cli.c')
-rw-r--r--cli.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/cli.c b/cli.c
index c5df898..cdbf9be 100644
--- a/cli.c
+++ b/cli.c
@@ -782,7 +782,9 @@ int WriteData(pcilib_t *handle, ACCESS_MODE mode, pcilib_dma_engine_addr_t dma,
if (dmaid == PCILIB_DMA_ENGINE_INVALID) Error("Invalid DMA engine (%lu) is specified", dma);
err = pcilib_write_dma(handle, dmaid, addr, size, buf, &ret);
if ((err)||(ret != size)) {
- if (!ret) Error("No data is written by DMA engine");
+ if (err == PCILIB_ERROR_TIMEOUT) Error("Timeout writting the data to DMA");
+ else if (err) Error("DMA engine returned a error while writing the data");
+ else if (!ret) Error("No data is written by DMA engine");
else Error("Only %lu bytes of %lu is written by DMA engine", ret, size);
}
break;