/alps/pcitool

To get this branch, use:
bzr branch http://darksoft.org/webbzr/alps/pcitool

« back to all changes in this revision

Viewing changes to pcitool/cli.c

  • Committer: Vasilii Chernov
  • Date: 2016-02-12 13:43:20 UTC
  • mto: This revision was merged to the branch mainline in revision 353.
  • Revision ID: vchernov@inr.ru-20160212134320-qj1oj1v4g6ixn9c8
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

Show diffs side-by-side

added added

removed removed

Lines of Context:
1703
1703
            const char *format = (val.format?val.format:"%u");
1704
1704
            
1705
1705
            
1706
 
            err = pcilib_read_register(handle, bank, reg, &verify);
1707
 
            if (err) Error("Error reading back register %s for verification\n", reg);
1708
 
                
1709
 
            if (!((model_info->registers[regid].mode&PCILIB_REGISTER_INCONSISTENT) ==  PCILIB_REGISTER_INCONSISTENT) && 
1710
 
                verify != value) {
1711
 
                Error("Failed to write register %s: %lu is written and %lu is read back", reg, value, verify);
1712
 
            } else {
1713
 
                printf("%s = ", reg);
1714
 
                printf(format, verify);
1715
 
                printf("\n");
1716
 
            }
 
1706
                        if(!((model_info->registers[regid].mode&PCILIB_REGISTER_INCONSISTENT) ==  PCILIB_REGISTER_INCONSISTENT))
 
1707
                        {
 
1708
                                err = pcilib_read_register(handle, bank, reg, &verify);
 
1709
                                if (err) Error("Error reading back register %s for verification\n", reg);
 
1710
                                
 
1711
                                if ( verify != value) {
 
1712
                                        Error("Failed to write register %s: %lu is written and %lu is read back", reg, value, verify);
 
1713
                                } else {
 
1714
                                        printf("%s = ", reg);
 
1715
                                        printf(format, verify);
 
1716
                                        printf("\n");
 
1717
                                }
 
1718
                        }
 
1719
                        else
 
1720
                                printf("%s is written\n ", reg);
1717
1721
        } else {
1718
1722
            printf("%s is written\n ", reg);
1719
1723
        }