summaryrefslogtreecommitdiffstats
path: root/pcitool/cli.c
diff options
context:
space:
mode:
authorVasilii Chernov <vchernov@inr.ru>2016-02-12 14:43:20 +0100
committerVasilii Chernov <vchernov@inr.ru>2016-02-12 14:43:20 +0100
commit55eab7196d0104c71e40136b3b22e9501d234e17 (patch)
treeb0fbfd40812e39cde3e5ef7a5ebddfc384102c24 /pcitool/cli.c
parentd7fc669bf0dbe37f46d2efec4940feb8504017c2 (diff)
downloadpcitool-55eab7196d0104c71e40136b3b22e9501d234e17.tar.gz
pcitool-55eab7196d0104c71e40136b3b22e9501d234e17.tar.bz2
pcitool-55eab7196d0104c71e40136b3b22e9501d234e17.tar.xz
pcitool-55eab7196d0104c71e40136b3b22e9501d234e17.zip
1. Cmakelists - move copy xml folder command to root file
2. - Move set python paths code to python module init funtction - pci.c move python module init block code after checking model to get paths before it runs. - Fix set python path code to work with PYTHONPATH - Update pci run script to work with PYTHONPATH - Fix python finalize code 3. Change pcilib_script_s interacting method. Now it stores in hash. 4. Change names of some fucntions to more unified ones 5. Remove old unused function pcilib_xml_create_script_or_transform_view 6. cli - disable reading register after set if write_verification flag is off 7. Remove uninformative error messages fro Python wrap. 8. - Server.py - add read/write property/register command handling - Add help message - Correcting paths
Diffstat (limited to 'pcitool/cli.c')
-rw-r--r--pcitool/cli.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/pcitool/cli.c b/pcitool/cli.c
index 3e69aac..3676a56 100644
--- a/pcitool/cli.c
+++ b/pcitool/cli.c
@@ -1703,17 +1703,21 @@ int WriteRegister(pcilib_t *handle, const pcilib_model_description_t *model_info
const char *format = (val.format?val.format:"%u");
- err = pcilib_read_register(handle, bank, reg, &verify);
- if (err) Error("Error reading back register %s for verification\n", reg);
-
- if (!((model_info->registers[regid].mode&PCILIB_REGISTER_INCONSISTENT) == PCILIB_REGISTER_INCONSISTENT) &&
- verify != value) {
- Error("Failed to write register %s: %lu is written and %lu is read back", reg, value, verify);
- } else {
- printf("%s = ", reg);
- printf(format, verify);
- printf("\n");
- }
+ if(!((model_info->registers[regid].mode&PCILIB_REGISTER_INCONSISTENT) == PCILIB_REGISTER_INCONSISTENT))
+ {
+ err = pcilib_read_register(handle, bank, reg, &verify);
+ if (err) Error("Error reading back register %s for verification\n", reg);
+
+ if ( verify != value) {
+ Error("Failed to write register %s: %lu is written and %lu is read back", reg, value, verify);
+ } else {
+ printf("%s = ", reg);
+ printf(format, verify);
+ printf("\n");
+ }
+ }
+ else
+ printf("%s is written\n ", reg);
} else {
printf("%s is written\n ", reg);
}