summaryrefslogtreecommitdiffstats
path: root/cli.c
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@dside.dyndns.org>2011-07-18 16:42:51 +0200
committerSuren A. Chilingaryan <csa@dside.dyndns.org>2011-07-18 16:42:51 +0200
commit9e424252a35879f121e7ea4531a9ab3dda56d595 (patch)
tree2cf3dfeceb67eee989a6cc4b20f639baf68748f8 /cli.c
parente9904116a5b39e47744fb39cc5aad574c8bee03f (diff)
downloadpcitool-9e424252a35879f121e7ea4531a9ab3dda56d595.tar.gz
pcitool-9e424252a35879f121e7ea4531a9ab3dda56d595.tar.bz2
pcitool-9e424252a35879f121e7ea4531a9ab3dda56d595.tar.xz
pcitool-9e424252a35879f121e7ea4531a9ab3dda56d595.zip
IRQ acknowledgement support in the engine API
Diffstat (limited to 'cli.c')
-rw-r--r--cli.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/cli.c b/cli.c
index 22dbed8..c5df898 100644
--- a/cli.c
+++ b/cli.c
@@ -1077,6 +1077,11 @@ int ListKMEM(pcilib_t *handle, const char *device) {
}
closedir(dir);
+ if ((n_uses == 1)&&(uses[0].count == 0)) {
+ printf("No kernel memory is allocated\n");
+ return 0;
+ }
+
printf("Use Type Count Total Size REF Mode \n");
printf("--------------------------------------------------------------------------------\n");
for (useid = 0; useid < n_uses; useid++) {
@@ -1144,7 +1149,7 @@ int FreeKMEM(pcilib_t *handle, const char *device, const char *use, int force) {
return 0;
}
-int WaitIRQ(pcilib_t *handle, pcilib_model_description_t *model_info, pcilib_irq_source_t irq_source, pcilib_timeout_t timeout) {
+int WaitIRQ(pcilib_t *handle, pcilib_model_description_t *model_info, pcilib_irq_hw_source_t irq_source, pcilib_timeout_t timeout) {
int err;
size_t count;
@@ -1186,7 +1191,7 @@ int main(int argc, char **argv) {
const char *event = NULL;
const char *dma_channel = NULL;
const char *use = NULL;
- pcilib_irq_source_t irq_source;
+ pcilib_irq_hw_source_t irq_source;
pcilib_dma_direction_t dma_direction = PCILIB_DMA_BIDIRECTIONAL;
pcilib_dma_engine_addr_t dma = PCILIB_DMA_ENGINE_ADDR_INVALID;