summaryrefslogtreecommitdiffstats
path: root/pcitool
diff options
context:
space:
mode:
authornicolas.zilio@hotmail.fr <>2015-09-15 14:56:35 +0200
committernicolas.zilio@hotmail.fr <>2015-09-15 14:56:35 +0200
commitc871ef59e748678b11d964e21debab05082948a0 (patch)
tree8afdbc92982bcfc412806ef09933f2a0630ecca0 /pcitool
parent1234f4a7e2410b127120aaa20dfe3c996ad34ef4 (diff)
downloadpcitool-c871ef59e748678b11d964e21debab05082948a0.tar.gz
pcitool-c871ef59e748678b11d964e21debab05082948a0.tar.bz2
pcitool-c871ef59e748678b11d964e21debab05082948a0.tar.xz
pcitool-c871ef59e748678b11d964e21debab05082948a0.zip
soka
Diffstat (limited to 'pcitool')
-rw-r--r--pcitool/cli.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/pcitool/cli.c b/pcitool/cli.c
index 378b8ba..69151b6 100644
--- a/pcitool/cli.c
+++ b/pcitool/cli.c
@@ -1033,6 +1033,7 @@ int ReadRegister(pcilib_t *handle, const pcilib_model_description_t *model_info,
pcilib_register_value_t value;
if (reg && !(strchr(fullreg,'/'))) {
+ printf("pass1\n");
pcilib_register_t regid = pcilib_find_register(handle, bank, reg);
bank_id = pcilib_find_register_bank_by_addr(handle, model_info->registers[regid].bank);
format = model_info->banks[bank_id].format;
@@ -1047,6 +1048,7 @@ int ReadRegister(pcilib_t *handle, const pcilib_model_description_t *model_info,
printf("\n");
}
}else if(reg && (s1=strchr(fullreg,'/'))){
+ printf("pass2\n");
char* enum_command=malloc(sizeof(char*));
if(!enum_command){
printf("Error allocating memory for the result\n");
@@ -1054,7 +1056,8 @@ int ReadRegister(pcilib_t *handle, const pcilib_model_description_t *model_info,
}
*s1=0;
regname=fullreg;
- viewname=fullreg+1;
+ viewname=s1+1;
+ printf("regname %s, viewname %s\n",regname,viewname);
if(!strcasecmp(viewname,"name")){
err = pcilib_read_view(handle,bank,regname,viewname,sizeof(char*),enum_command);
if (err) printf("Error reading register %s with an enum view\n", reg);