/alps/pcitool

To get this branch, use:
bzr branch http://suren.me/webbzr/alps/pcitool

« back to all changes in this revision

Viewing changes to pcilib/xml.c

  • Committer: Vasilii Chernov
  • Date: 2016-02-09 16:32:11 UTC
  • mto: This revision was merged to the branch mainline in revision 353.
  • Revision ID: vchernov@inr.ru-20160209163211-j56vrnez4sbt9r1o
Add write_register python wrap. Add no_set_check attribute to pcilib_view_t type

Show diffs side-by-side

added added

removed removed

Lines of Context:
492
492
static int pcilib_xml_parse_view(pcilib_t *ctx, xmlXPathContextPtr xpath, xmlDocPtr doc, xmlNodePtr node, pcilib_view_description_t *desc) {
493
493
    xmlAttrPtr cur;
494
494
    const char *value, *name;
 
495
    
 
496
    int register_no_chk = 0;
495
497
 
496
498
    for (cur = node->properties; cur != NULL; cur = cur->next) {
497
499
        if (!cur->children) continue;
539
541
                return PCILIB_ERROR_INVALID_DATA;
540
542
            }
541
543
        }
542
 
    }
 
544
                else if (!strcasecmp(name, "no_set_check")) {
 
545
                        if (!strcasecmp(value, "1"))
 
546
                                register_no_chk = 1;
 
547
                }
 
548
        }
 
549
        if(register_no_chk)
 
550
        {
 
551
                desc->mode |= PCILIB_REGISTER_NO_CHK;
 
552
        }
543
553
 
544
554
    return 0;
545
555
}
550
560
    const char *value, *name;
551
561
    pcilib_view_context_t *view_ctx;
552
562
 
553
 
    pcilib_access_mode_t mode = 0;
 
563
    pcilib_access_mode_t mode = PCILIB_REGISTER_NO_CHK;
554
564
    pcilib_script_view_description_t desc = {{0}};
555
565
 
556
566
    desc.base.api = &pcilib_script_view_api;
595
605
    const char *value, *name;
596
606
    pcilib_view_context_t *view_ctx;
597
607
 
598
 
    pcilib_access_mode_t mode = 0;
 
608
    pcilib_access_mode_t mode = PCILIB_REGISTER_NO_CHK;
599
609
    pcilib_transform_view_description_t desc = {{0}};
600
610
 
601
611
    desc.base.api = &pcilib_transform_view_api;