diff options
author | zilio nicolas <nicolas.zilio@kit.edu> | 2015-07-01 16:18:45 +0200 |
---|---|---|
committer | zilio nicolas <nicolas.zilio@kit.edu> | 2015-07-01 16:18:45 +0200 |
commit | f82813bfa40193aec07e013b029eec6dc092ecdd (patch) | |
tree | 4f6b814177a0750b2c2c37aa2b2e47ffefc27255 /pcitool/cli.c | |
parent | e2515f6e1a7b17addda4c558a0a6ca05b4ec6e55 (diff) | |
download | pcitool-f82813bfa40193aec07e013b029eec6dc092ecdd.tar.gz pcitool-f82813bfa40193aec07e013b029eec6dc092ecdd.tar.bz2 pcitool-f82813bfa40193aec07e013b029eec6dc092ecdd.tar.xz pcitool-f82813bfa40193aec07e013b029eec6dc092ecdd.zip |
registers and banks support in xml v1. pci -ll works fine, but got segfault on pci -r name and pci -r name gives 0 always. might be due to the order in pci.c ------> ask suren
Diffstat (limited to 'pcitool/cli.c')
-rw-r--r-- | pcitool/cli.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/pcitool/cli.c b/pcitool/cli.c index 9eeb046..f105349 100644 --- a/pcitool/cli.c +++ b/pcitool/cli.c @@ -37,6 +37,7 @@ #include "error.h" #include "debug.h" #include "model.h" +#include "xml.h" /* defines */ #define MAX_KBUF 14 @@ -89,7 +90,8 @@ typedef enum { MODE_ALLOC_KMEM, MODE_LIST_KMEM, MODE_READ_KMEM, - MODE_FREE_KMEM + MODE_FREE_KMEM, + MODE_VALIDATE_XML } MODE; typedef enum { @@ -135,6 +137,7 @@ typedef enum { OPT_GRAB = 'g', OPT_QUIETE = 'q', OPT_HELP = 'h', + OPT_VALIDATE_XML= 'v', OPT_RESET = 128, OPT_BENCHMARK, OPT_TRIGGER, @@ -182,6 +185,7 @@ static struct option long_options[] = { {"iterations", required_argument, 0, OPT_ITERATIONS }, {"info", no_argument, 0, OPT_INFO }, {"list", no_argument, 0, OPT_LIST }, + {"validate", no_argument,0,OPT_VALIDATE_XML}, {"reset", no_argument, 0, OPT_RESET }, {"benchmark", optional_argument, 0, OPT_BENCHMARK }, {"read", optional_argument, 0, OPT_READ }, @@ -328,6 +332,8 @@ void Usage(int argc, char *argv[], const char *format, ...) { " Data can be specified as sequence of hexdecimal number or\n" " a single value prefixed with '*'. In this case it will be\n" " replicated the specified amount of times\n" +" XML:\n" +" -v -validates the xml file against xsd" "\n\n", argv[0]); @@ -3122,6 +3128,9 @@ int main(int argc, char **argv) { // Requesting real-time priority when needed switch (mode) { + case MODE_VALIDATE_XML: + validation(); + break; case MODE_READ: case MODE_WRITE: if (amode != ACCESS_DMA) |