From 87583e6ec5c1961ef975b873041eeada3e1e6c6d Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Fri, 19 Jun 2015 17:53:06 +0200 Subject: Execute all operations on kernel_memory using plain pci model to avoid extra references --- pcitool/cli.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'pcitool') diff --git a/pcitool/cli.c b/pcitool/cli.c index 580d992..9eeb046 100644 --- a/pcitool/cli.c +++ b/pcitool/cli.c @@ -2689,6 +2689,7 @@ int main(int argc, char **argv) { case OPT_LIST_KMEM: if (mode != MODE_INVALID) Usage(argc, argv, "Multiple operations are not supported"); mode = MODE_LIST_KMEM; + if (!model) model = "pci"; if (optarg) use = optarg; else if ((optind < argc)&&(argv[optind][0] != '-')) use = argv[optind++]; @@ -2708,6 +2709,7 @@ int main(int argc, char **argv) { case OPT_READ_KMEM: if (mode != MODE_INVALID) Usage(argc, argv, "Multiple operations are not supported"); mode = MODE_READ_KMEM; + if (!model) model = "pci"; num_offset = strchr(optarg, ':'); @@ -2724,6 +2726,7 @@ int main(int argc, char **argv) { case OPT_ALLOC_KMEM: if (mode != MODE_INVALID) Usage(argc, argv, "Multiple operations are not supported"); mode = MODE_ALLOC_KMEM; + model = "pci"; if (optarg) use = optarg; else if ((optind < argc)&&(argv[optind][0] != '-')) use = argv[optind++]; @@ -2731,6 +2734,7 @@ int main(int argc, char **argv) { case OPT_FREE_KMEM: if (mode != MODE_INVALID) Usage(argc, argv, "Multiple operations are not supported"); mode = MODE_FREE_KMEM; + if (!model) model = "pci"; if (optarg) use = optarg; else if ((optind < argc)&&(argv[optind][0] != '-')) use = argv[optind++]; -- cgit v1.2.3